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