Varnish cache is an accelerator that sits in front of the web application, and serves cached web pages. It can speed up the web site significantly and lift loads off the web application. The web application gets to receive web traffic through Varnish. The unintended side effect is that all incoming traffic for the web application look as if they are originating from a single IP, say, 127.0.0.1, because they do come from a single source, Varnish.
Here is how to configure Drupal 7, Varnish and Apache web server to log correct client IP addresses.