Nonlinear constrained finite element approximations to anisotropic diffusion problems are considered. Starting with a standard (linear or bilinear) Galerkin discretization, the entries of the stiffness matrix are adjusted so as to enforce sufficient conditions of the discrete maximum principle (DMP). An algebraic splitting is employed to separate the contributions of negative and positive off-diagonal coefficients which are associated with diffusive and antidiffusive numerical fluxes, respectively. In order to prevent the formation of spurious undershoots and overshoots, a symmetric slope limiter is designed for the antidiffusive part. The corresponding upper and lower bounds are defined using an estimate of the steepest gradient in terms of the maximum and minimum solution values at surrounding nodes. The recovery of nodal gradients is performed by means of a lumped-mass L2 projection. The proposed slope limiting strategy preserves the consistency of the underlying discrete problem and the structure of the stiffness matrix (symmetry, zero row and column sums). A positivity-preserving defect correction scheme is devised for the nonlinear algebraic system to be solved. Numerical results and a grid convergence study are presented for a number of anisotropic diffusion problems in two space dimensions.