  We investigate cosmological perturbations for nonlinear $f(R)$ models within
the cosmic screening approach. Matter is considered both in the form of a set
of discrete point-like massive bodies and in the form of a continuous
pressureless perfect fluid. We perform full relativistic analysis of the
first-order theory of scalar perturbations for arbitrary nonlinear $f(R)$
models and demonstrate that scalar potentials $\Phi(t,\mathbf{r})$ and
$\Psi(t,\mathbf{r})$ are determined by a system of only two master equations.
Our equations are applicable at all spatial scales as long as the approximation
$\delta R/\bar R \ll 1$ (which is usually assumed in studies devoted to
cosmological perturbations in $f(R)$ models) works.
