Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
networking:linux:iptables [20 years ago - 2005/11/23 20:28] aogailnetworking:linux:iptables [19 years ago - 2007/05/28 06:45] (current) – external edit 127.0.0.1
Line 4: Line 4:
   # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT   # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
  
 +
 +===== Forward a Port/range =====
 +  * **Add the forwarding rule**
 +
 +  # iptables -t nat -I PREROUTING -i ethExternal -p tcp --dport 4662 -j DNAT --to 192.168.0.11:4662
 +
 +  * **Enable forwarding rule**
 +
 +  # iptables -I FORWARD -i ethExternal -p tcp -d 192.168.0.11/32 --dport 4662 -j ACCEPT
 +
 +  * **Add forwarding rule for internal hosts**
 +
 +  # iptables -I FORWARD -i ethExternal -p tcp -s 192.168.0.11/32 --dport 4662 -j ACCEPT
 +
 +===== Reference Links =====
 +  * [[http://www.informit.com/articles/article.asp?p=421057&rl=1|InformIT iptables]]