Linux : Port forwarding with IPtables

By | September 30, 2016

Need to forward a custom port to an existing port on your Linux box?

Simply use the following command as root :

Example : Assuming you want to forward port 1025 to port 587 :

The command above won’t survive to reboot, see the configuration below to enter in the IPTables script :