tips:linux:iptablesredir
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | tips:linux:iptablesredir [2009/06/08 15:39] (current) – created erik | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to redirect a port using iptables? ====== | ||
+ | To redirect port 80 to 8080 use: | ||
+ | |||
+ | iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 | ||
+ | |||
+ | To list the NAT rules use: | ||
+ | |||
+ | iptables -t nat -L |
tips/linux/iptablesredir.txt · Last modified: 2009/06/08 15:39 by erik