Squid installation

  • In Debian it is easy…run command

apt-get install squid

Squid configuration

  • open and edit following configuration file /etc/squid/squid.conf

set port on which squid will listen

http_port 3128 transparent

You can choose different port if you wish

define list of hosts allowed to use our proxy

acl lan src

Set rule to allow our list of hosts to use proxy

http_access allow lan

Sequence order is important!

Firewall configuration

  • Create rules to redirect http traffic to our proxy

iptables -A INPUT -s -p tcp –dport 3128 -j ACCEPT

iptables -t nat -A PREROUTING -s -p tcp –dport 80 -j DNAT –to

Restart firewall and proxy.


dzbanek 2011-11-22