Home Linux Basics Open a PORT NUMBER in IPTABLES –Linux

Open a PORT NUMBER in IPTABLES –Linux

by SupportPRO Admin

IPTABLES stores its configuration in the file : /etc/sysconfig/iptables. You can open a port number by editing this file but, you strictly need a root credentials to do this.

The steps are as follows:

1. Open the file /etc/sysconfig/iptables :

#vi /etc/sysconfig/iptables

2. Append the following rule to it:

-A INPUT -m state state NEW -m tcp -p tcp dport [port_number] -j ACCEPT

Make sure that you change the [port_number] to the actual number (say 8088 or 8090).

3. Restart iptables:

#/etc/init.d/iptables restart

4. Verify that the port is opened:

#netstat -tulpn | less

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment