- Apache (9)
- DNS / BIND (2)
- General Linux (7)
- Mail (8)
- Postfix (1)
- Qmail (4)
- Sendmail (3)
- MySQL (7)
- News (1)
- Other (2)
- Perl (1)
- PHP (5)
- Plesk (13)
- Redhat Linux (8)
- Ruby (1)
- Scripts (4)
- Security (4)
- iptables (2)
TopicNavigationUser login |
Port forwardingIn order to set up port forwarding on IPtables, you can use the following (for forwarding one tcp port to another): iptables -t nat -A PREROUTING -p tcp --dport [port to forward] -j DNAT --to [destination ip]:[destination port] For example, to forward from port 26 to port 25 (a fairly common practice) on 192.168.1.37 you'd use: iptables -t nat -A PREROUTING -p tcp --dport 26 -j DNAT --to 192.168.1.37:25 Note that this rule will be added in the nat table, so won't show up on a standard iptables -L -v, and iptables -F won't clear it (you'll need to use iptables -t nat -L -v / iptables -t nat -F). |
Linux JournalSlashdot |