This is my print out when I do "iptables -L"; there is no difference before and after I do "iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080"
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere REJECT all -- anywhere 127.0.0.0/8 reject-with icmp-port-unreachable ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:30000 ACCEPT icmp -- anywhere anywhere icmp echo-request REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
I would like to know if there's any chance I'm doing anything wrong, all I want to do is redirect traffic from port 80 to 8080 so my squid proxy can filter it.
Normally the way you would run a proxy/cache for a server is to run squid on port 80 and no iptables trickery is needed. Squid would then be configured to proxy to whatever backend webserver you want.