View Single Post

  #3 (permalink)  
Old 09-04-2007, 03:51 AM
dancave dancave is offline
Junior Member
User
 
Join Date: Aug 2007
My distro: fedora
Posts: 8
Rep Power: 0
dancave is on a distinguished road
Default

This can be done via the following rule.

1. install squid running on your host/gateway

2. setup iptables and ipforwarding

3. use the following rule in your /etc/sysconfig/iptables file.

-A PREROUTING -i <your lan interface> -s ! <the IP of your squid host> -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

This will route all web traffic on port 80 to the squid port on your gateway/router host.

4. run service squid restart
5. run service iptables restart

should be working nicely,

tail -f /var/log/squid.access.log in an xterm

run your favourite browser on one of your clients on your lan

go to www.google.com, watch the squid log..

Rgds
dan
Reply With Quote