Thursday, July 22, 2010

Enabling port 8000 or 80 on Linux

A very simple method to check whether the port is working or not is , type the following at console :

telnet your_ip port_number (which u want to check)

 telnet  192.168.1.2  8000  

if you are able to connect it or can see a blank screen means the port is "open".

if not then change the firewall settings , do the following :
  • check the : vi  /etc/sysconfig/iptables 
          You should find  :
       
          -A RH-Firewall-1-INPUT -m state NEW -m tcp --dport 21 -j ACCEPT
          -A RH-Firewall-1-INPUT -m state NEW -m tcp --dport 22 -j ACCEPT

         See if there is --dport 80 or 8000 or anyport which you want to access , if not add the following entry to iptables changing the --dbport to whichever port you want to open.

             
     -A RH-Firewall-1-INPUT -m state NEW -m tcp --dport 80 -j ACCEPT  
     
    restart the iptables service by :
     
               
      service  iptables   restart  

    hope this works , !!!!!!!

     Note : Its not limited to port 80 or 8000 ,its applicable to any ports
     
     
     
     
     
     

    No comments:

    Post a Comment

    LinkWithin

    Related Posts with Thumbnails
    Make Money Blogging