13
3
Suppose I have a network with a server routing all connections from inside the network to the Internet. How can I set up iptables so that instead of routing incoming connections to the Internet, it instead routes them to localhost port 8080. All help is appreciated.
The problem is that with simple redirection (destination IP address NAT) you will lose the original destination IP address. Do you want to setup a transparent HTTP proxy or should it process other protocols than HTTP too? – pabouk – 2013-10-18T13:14:51.933
It doesn't matter if its transparent or not – DankMemes – 2013-10-18T14:49:17.497
Redirecting all the traffic to a proxy is a base for transparent proxy :) – pabouk – 2013-10-18T15:54:16.150
Here's another answer that really helped me out:
http://unix.stackexchange.com/questions/111433/iptables-redirect-outside-requests-to-127-0-0-1/112232