Munawar Zeeshan, on 02/13/2007 12:03 PM [GMT+500], wrote : > I have a very sticky problem. > > My squid machine is between LAN and my DSL modem.Eth0 is is connected > to LAN switch while Eth1 is connected with the DSL modem.I have > following in my rc.local for tranparent proxy and masquerading. > > /usr/local/squid/sbin/squid > echo 1 > /proc/sys/net/ipv4/ip_forward > iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT > --to-port 3128 Hash the below line, you don't need this while doing interception for UDP. > iptables -t nat -A PREROUTING -i eth0 -p udp --dport 80 -j REDIRECT > --to-port 3128 > iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE > > Are my above lines ok ?? > Yes Looks fine. > My /etc/hosts file is..while my machine name is linuxgateway.ecda.gov.pk > > 127.0.0.1 localhost.localdomain localhost > 192.168.3.1 linuxgateway.ecda.gov.pk linuxgateway > > and in resolve.conf > nameserver 192.168.3.81 > I will suggest you to run, cache only DNS on your linux machine, it will give you performance by caching dns queries, and then modify your resolve.conf nameserver 127.0.0.1 Thanks