Transparent Proxyd in Ubuntu
Transparent Proxyd in Ubuntu
In this article, it is assumed that Squid has been installed and running well, because the
contents of this article will not discuss the installation of squid. The following is just an
example of the steps in configuring Squid as a transparent proxy and HAVP (in collaboration
with ClamAV) as a virus scanner (parent proxy).
1. Information schema.
Transparent Proxy*
192.168.0.253:3128
|| [eth1]
|| ||
[Intranet]--------[Squid]-+-[HAVP]--------[Internet]
|| ||
[eth0] Parent Proxy
192.168.0.0/24 127.0.0.1:8080
||
||
[ClamAV]
2. Installing HAVP, ClamAV and ClamAV update virus databases for the first time.
USER havp
GROUP havp
DAEMON true
PIDFILE /var/run/havp/havp.pid
SERVERNUMBER 20 # please adjust itself
MAXSERVERS 100 # please adjust ifself
ACCESSLOG /var/log/havp/access.log
ERRORLOG /var/log/havp/havp.log
USESYSLOG false
SYSLOGNAME havp
SYSLOGFACILITY daemon
SYSLOGLEVEL info
5. Make sure the rules in the IPTables NAT in this case as step 1, at least as the following
lines.
~# squid -k reconfigure
~# /etc/init.d/havp force-reload
- or -
~# /etc/init.d/squid restart
~# /etc/init.d/havp restart
7. Finish.
In this article, it is assumed that Squid has been installed and running well, because the
contents of this article will not discuss the installation of squid. The following is just an
example of the steps in configuring Squid as a parent proxy (not transparent proxy) and
HAVP (in collaboration with ClamAV) as a virus scanner (transparent proxy).
1. Information schema.
[ClamAV]
||
||
Transparent Proxy*
192.168.0.253:8080
|| [eth1]
|| ||
[Intranet]--------[HAVP]-+-[Squid]--------[Internet]
|| ||
[eth0] Parent Proxy
192.168.0.0/24 127.0.0.1:3128
2. Installing HAVP, ClamAV and ClamAV update virus databases for the first time.
3. Add the following line into file “/etc/squid/squid.conf”. If the existing configuration, like
this “http_port 192.168.0.253:3128 transparent”, please change the following lines like this.
http_port 127.0.0.1:3128
USER havp
GROUP havp
DAEMON true
PIDFILE /var/run/havp/havp.pid
SERVERNUMBER 20 # please adjust itself
MAXSERVERS 100 # please adjust ifself
ACCESSLOG /var/log/havp/access.log
ERRORLOG /var/log/havp/havp.log
USESYSLOG false
SYSLOGNAME havp
SYSLOGFACILITY daemon
5. Make sure the rules in the IPTables NAT in this case as step 1, at least as the following
lines. If the IPTables NAT rule to redirect port prior to 3128, please change it to 8080.
~# squid -k reconfigure
~# /etc/init.d/havp force-reload
- or -
~# /etc/init.d/squid restart
~# /etc/init.d/havp restart
7. Finish.