I have setup a Squid + Dansguardian parental control at home. I connected a WIFI router to the Ubuntu machine and share that network for my kids' mobile devices. The parental control works fine on the box and I have used IPTables to route ALL http traffic to dansguardian. For some reason, when I route the eth0 (the shared network) to dansguardian (port 8080), it does not work. It works fine if I route it to squid (port 3128), it works fine ( ofcourse without dansguardian filtering).
This is how I have my iptables right now (routing eth0 to 3128) :
Chain PREROUTING (policy ACCEPT) target prot opt source destination REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 3128 Chain INPUT (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination REDIRECT tcp -- anywhere anywhere ! owner UID match proxy tcp dpt:http redir ports 8080 ACCEPT tcp -- anywhere anywhere tcp dpt:3128 owner UID match proxy Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- 10.42.0.0/24 !10.42.0.0/24
but the moment i route the eth0 over to 8080 (instead of 3128 in PREROUTING), I am not able to access the internet. Not sure what is going wrong . Any help will be greatly appreciated.