How to open port on server.

How to open port on server.

Hello Friends,

Following are the commands to open tcp or udp ports on the server.

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

you can verify the port withDedicated Hosting

netstat -nap | grep : can open TCp port with

iptables -A INPUT -p tcp –dport

2. You can open UDP port with

iptables -A INPUT -p udp –sport

after that

3 service iptables save

and for flushhing iptables us

iptables -F



  1. Peter

    hi, I want to open the UDP ports number 21540 and 54468 that I need to play an online game because now everytime I try to play online it says “Cant Connect to server”, I did “iptables -A INPUT -p udp –sport 54468 -j ACCEPT” but it says “bad argument 54468” the same when I try the port 21540, I dont know why, can you help me? please

Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.