I am setting up a squid proxy server which currently is working. I am how ever having issues with IPtables and getting the correct command and syntax basically I want all HTTP traffic coming in on port routed to port 3128 and all other traffic would be sent to the router. Can any one tell me how to get that setup. Below is the command and syntax I used.
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j DNAT --to 172.20.20.201:3128
Basically my squid proxy server sites behind the router and would filter HPTP traffic then send it to the router and all other traffic would be sent on itís way to the router and off to the internet .
My plan was to setup dhcp so the default gateway would be my proxy server that way we donít have to configure their web browser it would all be transparent.
This will send all port 80 traffic to port 3128. I assuming your proxy is running transparently.
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
I sure am. I found the problem had to add the below line in the
http_port IP:3128 transparent
Here Ip is the IP address of my proxy box