Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 2187549cb653ebceb5191a4547eaa374 > files > 1056

squid-2.5.STABLE10-10.4.20060mdk.x86_64.rpm

# eth1 is the external interface and 192.168.2.178 is the internal address of teh squid server
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth1 -o eth2 -j ACCEPT
iptables -A FORWARD -i eth2 -o eth1 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp -d 0.0.0.0/0 --dport 80 -j DNAT --to 192.168.2.178:3128
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
# Mandrake-Security : if you remove this comment, remove the next line too.
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter