Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How To Open A New Port

Discussion in 'General Discussion' started by rootuser, Feb 2, 2005.

  1. rootuser

    rootuser Well-Known Member

    Joined:
    Jan 31, 2005
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    ***INDIA***
    I WANT TO OPEN A NEW PORT IN MY CPANEL SERVER, (1 of MY client ask to me open a particular port to his needs) APF+IPTABLES are enabled there.HOW CAN I OPEN IT. :) :) :)
     
  2. JP-HOST

    JP-HOST Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Roscoe, IL, USA

    pico /etc/apf/conf.apf

    Add the port in the section of Ingress and Egress port listings. You will need to know if it is Inbound (Ingress) and/or Outbound (Egress) and whether it is TCP or UDP.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rootuser

    rootuser Well-Known Member

    Joined:
    Jan 31, 2005
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    ***INDIA***
    IT is an ingress tcp port,but it is not lisiting when i try to scan the opened ports :) :)
     
    #3 rootuser, Feb 2, 2005
    Last edited: Feb 2, 2005
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    The server itself does not open ports itself - you have to have an application daemon running that opens a port and then listens for connections (e.g. httpd, pop3, dns, etc).

    Which port and for what application is this for?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. JP-HOST

    JP-HOST Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Roscoe, IL, USA
    Did you /etc/apf/apf -r after editing the conf.apf file?

    Also as Chirpy stated the server isn't going to be listening on that port unless something is runing to accept connections. What application and reason did your client ask for the port to be opened? Are they running a program that will listen on it? Are you sure it wasn't an egress port? I have a couple of clients that have apps that query GameServers and Teamspeak servers. I have not had to open a ingress port yet other than the default ones.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. steve.deobald

    steve.deobald Member

    Joined:
    May 10, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Should apf be installed with cpanel? It would appear it isn't on my server. (I'd like to open ports the "cpanel recommended" way, if possible.)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    No, APF is a popular script app that creates an iptables firewall that many people running on Linux servers that have cPanel installed use:
    http://www.rfxnetworks.com/apf.php
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. steve.deobald

    steve.deobald Member

    Joined:
    May 10, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Thanks Chirpy!

    I've set up APF and modified the config to open port 3000 (I'm just playing with Ruby on Rails on my server). It still doesn't seem to be accepting connections, though. Is there anything I need to do outside of /etc/apf/conf.apf as well?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. ntwaddel

    ntwaddel Well-Known Member

    Joined:
    Nov 3, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Templeton, CA
    are you sure your program is even listening on the port?
     
  10. steve.deobald

    steve.deobald Member

    Joined:
    May 10, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    I wasn't sure. And now that I know what was wrong, I know it wasn't listening. ;)

    I was experimenting with Ruby on Rails. For anyone who's curious, you'll need to specify `-b 0.0.0.0' at the command line for WEBrick to accept outside connections.

    Thanks for the help guys!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice