user-avatar
Today is Friday
November 22, 2024

Tag: iptables

November 3, 2009

To allow forwarding of a port in the server

by viggy — Categories: tech — Tags: , , , Leave a comment

Well I needed to forward port 587 in my server so that Thunderbird installed in my local desktop could send mails through gmail account.
Here is how I did it.

iptables -I FORWARD -p tcp –dport 587 -j ACCEPT

What the above command does exactly is writes a (-I) inserts a new rule in the FORWARD chain which (-j) ACCEPTs all packets following (-p) tcp protocol and (–dport) destination port 587