Thursday, June 25, 2015

How to open a port on Linux Machine


1. Use this command to get the listing:

     iptables -L -n

2. Make an entry as first entry in iptables to allow port 5601: 

    iptables -I INPUT 2 -p tcp --dport 5601 -j ACCEPT

3. Save the settings:
    /etc/init.d/iptables save

4. Restart the service:

   /etc/init.d/iptables start

No comments:

Post a Comment