Squid+DansGuardian logs only localhost

After installation of DansGuardian, mentioned in previous posts, if you get, as IP address in /var/log/squid/access only, there is a way to solve that problem!!!

Here is what needs to be done :
File /etc/dansguardian/dansguardian.conf
# if on it adds an X-Forwarded-For: to the HTTP request
# header. This may help solve some problem sites that need to know the
# source ip. on | off
forwardedfor = on

File /etc/squid/squid.conf
# acl localhost src
# acl my_other_proxy srcdomain .proxy.example.com
# follow_x_forwarded_for allow localhost
# follow_x_forwarded_for allow my_other_proxy
# follow_x_forwarded_for deny all
follow_x_forwarded_for allow localhost

If these lines do not exist, add them.
Restart the service, and that is that 🙂

A very helpful link.

This entry was posted in Linux and tagged , , , . Bookmark the permalink.

Comments are closed.