How to open ports on server

The following commands will allow you to open tcp or udp ports on the server.

Before using commands for opening the port please make ensure the specific port is already opend and what is the use of that port.

you can verify the port with command

netstat -nap | grep : <port no> can open TCp port with

iptables -A INPUT  -p tcp –dport <port no> -j ACCEPT

2. You can open UDP port with

iptables -A INPUT -p udp –sport <port no>  -j ACCEPT

after that

3 service iptables save

and for flushhing iptables us

iptables -F

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *