Port forwarding with iptables
Say I have two IPs on the server as follows:
1.2.3.4 and 5.6.7.8 1.2.3.4 is listening on port 21 (FTP Daemon) 5.6.7.8 is listening on 55555 (Another FTP Daemon) What iptables rule do I add so that port 21 to 5.6.7.8 is forwarded to port 55555 on 5.6.7.8? It should not affect the other IP. |
iptables -A PREROUTING -p tcp -m tcp --dport 21 -d 5.6.7.8 -j DNAT --to-destination 5.6.7.8:55555
|
All times are GMT -5. The time now is 05:18 PM. |