Friday, 13 December 2013

Using Iptables for Port Routing

You can use iptables for port routing. Sometimes you may need to enable alternate port numbers on server. In this case we will see how to use port 26 for mailing purpose.

The following will enable port 26 or port 25 for SMTP requests. All request to port 26 will be routed to port 25.

=========
 iptables -t nat -A PREROUTING -p tcp -d 192.168.1.1 --dport 26 -j DNAT --to 192.168.1.1:25
=========

No comments:

Post a Comment