User Tools

Site Tools


tips:linux:iptablesredir

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tips:linux:iptablesredir [2009/06/08 15:39] (current)
erik created
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