Hello,
I have a pretty useless satellite link at home (far from any civilization), so I wanted to set up caching in order to speed things up. My Squid 2.6 runs "3128 transparent" and is set up quite well on a separate machine.
I also have my dd-wrt router to move all port 80 traffic through proxy:
#!/bin/sh
PROXY_IP=192.168.0.12
PROXY_PORT=3128
LAN_IP=`nvram get lan_ipaddr`
LAN_NET=$LAN_IP/`nvram get lan_netmask`
iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d $LAN_NET -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i br0 -s ! $PROXY_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT
iptables -t nat -I POSTROUTING -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -j SNAT --to $LAN_IP
iptables -I FORWARD -i br0 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -
However, when I look into squid logs, they only grow when the proxy is set explicitly in browsers setup (manually). The access.log doesn't grow once the settings are cleared.
My expectations: if I have my router move all the port 80 traffic through squid, it should show up in the access.log
Any ideas?
---------- Post updated at 03:27 PM ---------- Previous update was at 01:17 PM ----------
OK, seems I've narrowed down the thing... What I want to do is route port 80 traffic from my network to the Squid. However - I do not want the traffic from Squid to the Internet to be looped back (Squid server is on the same subnet).
I already know why the logs didn't grow - the traffic wasn't routed to Squid at all! Point is, I have no idea on how to identify ethN ports in my router, so I assumed br0 would be OK. Apparently it isn't.