RSS

Enabling a port in ubuntu and CentOS

09 Aug

To enable a specific port for inter-net access, from the firewall restrictions,

open the file iptables in your system with the command,

vi /etc/sysconfig/iptables

Add the following line

-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 143 -j ACCEPT      – To enable port 143

Restart the iptables, with

/etc/init.d/iptables restart

 
2 Comments

Posted by on August 9, 2011 in CentOS, Networking, Ubuntu

 

Tags: , , ,

2 responses to “Enabling a port in ubuntu and CentOS

  1. ramanavelramanavel

    March 14, 2012 at 9:28 am

    its not working

     
    • Creators

      March 14, 2012 at 12:08 pm

      Copy the exact syntax in iptables file and change the port number as per your system.. This is for enabling a port in the firewall settings, and not for enabling firewall

       

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: