Skip to main content

dansguardian, squid and iptables

More
19 years 1 week ago #12042 by monsky
hello there, what should be the syntax in iptables if i have dansguardian and squid? ive been figuring this out for how many days now and everytime i did redirecting the port 3128 (port of squid) to port 8080 (dansguard) i could not browse the internet. with the port 3128 all works fine. but when i redirect the 3128 to 8080 i couldnt browse the internet. eth0 in the internal network and eth1 to the internet. :(
can somebody give me the idea how to fix this?

thnx again in advance
More
19 years 1 week ago #12045 by DaLight
Did you use the following command?

[code:1]iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3128 -j REDIRECT --to-port 8080[/code:1]

Let us know if it works.
More
19 years 1 week ago #12100 by monsky
thnx Dalight,

yes i did what you had suggested. but was it right that i first redirect the port 80 to 3128 (squid) then redirecting the 3128 to 8080 (dansguardian) ?

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3128 -j REDIRECT --to-port 8080
More
19 years 1 week ago #12101 by DaLight
No just use the line I gave you and set the Proxy to Transparent mode.
More
19 years 4 days ago #12192 by monsky
tnx DaLight. problem solved.
More
19 years 4 days ago #12202 by DaLight
Excellent! How do you find DansGuardian as a content filter?
Time to create page: 0.128 seconds