SyntaxHighlighter

Sunday, June 18, 2017

Forwarding Ports with IPTables

to use IPTables to forward ports...

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

all this from http://richardfergie.com/redirect-port-80-to-a-different-port-using-iptables

and how to remove the routing

iptables -t nat --line-numbers -L
iptables -t nat -D PREROUTING [number]

No comments:

Post a Comment