Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Ok. I found the problem, I had the dansguardian started on 127.0.0.1 and was not running oon all the available IPs. removed the 127.0.0.1 from the conf and it all works fine now.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.