November 15, 2012


Filed under: Linux Basics — SupportPRO Admin @ 11:13 pm

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

AddThis Social Bookmark Button

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress