  We study isotropic and anisotropic (Bianchi I) cosmologies in Palatini $f(R)$
and $f(R,R_{\mu\nu}R^{\mu\nu})$ theories of gravity and consider the existence
of non-singular bouncing solutions in the early universe. We find that all
$f(R)$ models with isotropic bouncing solutions develop shear singularities in
the anisotropic case. On the contrary, the simple quadratic model $R+a
R^2/R_P+R_{\mu\nu}R^{\mu\nu}/R_P$ exhibits regular bouncing solutions in both
isotropic and anisotropic cases for a wide range of equations of state,
including dust (for $a<0$) and radiation (for arbitrary $a$). It thus
represents a purely gravitational solution to the big bang singularity and
anisotropy problems of general relativity without the need for exotic ($w>1$)
sources of matter/energy.
