The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help with unblocking ports

Discussion in 'General Discussion' started by deflime, Aug 5, 2011.

  1. deflime

    deflime Registered

    Joined:
    Aug 5, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    So I have a hosted server with about 200 accounts running cPanel off of WHM.

    I was looking to unblock port 30000 on the server.

    I came across literature about installing a firewall plugin like CSF or APF.

    I have since gotten in touch with the company that manages the server to unblock the port and they have since said that they have (twice). But if I run a test through ssh, telnet random-domain-on-my-server.com 30000, I still get a refused connection. Also, the software that requires the open port, still doesn't work (obviously).

    Any thoughts?

    Even though they opened port 30000 do I still need to install a firewall plugin and configure WHM to open the port? Or should that already be enough and they haven't done it properly?

    Thanks for any help!
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You can check if the port has been opened in the firewall:

    Code:
    /sbin/iptables -n -L | grep 30000
    Also, does the port need opened for incoming or outgoing port 30000? That does matter for the firewall rule because those are different chains in the firewall and they might have added the port to the wrong chain.
     
  3. deflime

    deflime Registered

    Joined:
    Aug 5, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Not sure on incoming/outgoing, I would assume both, information is sent to 3rd party website, and then results are returned.

    --

    Here are the results:

    Code:
    /root$ /sbin/iptables -n -L | grep 30000
    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:30000 
    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:30000 
    
    So looks like it's open, though the blank ips are confusing me a little, not completely sure what to take from this.

    Code:
    telnet domain.com 30000
    Is still showing connection refused.

    So if it is open, I am guessing that what I need to do is, in fact, install a firewall plugin for the last step, right?
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Can you check the full return for the firewall now:

    Code:
    /sbin/iptables -n -L
    They probably only added it for outgoing tcp and udp and not for incoming.
     
  5. deflime

    deflime Registered

    Joined:
    Aug 5, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Very long results..

    But it only showed up in Chain INPUT and not in Chain OUTPUT.. is that what you mean or should I look for something else?
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Ask them to put it into the OUTPUT chain for tcp and udp then, or you can try to add it yourself:

    Code:
    /sbin/iptables -I OUTPUT -p tcp -m tcp --dport 30000 -j ACCEPT
    /sbin/iptables -I OUTPUT -p udp -m udp --dport 30000 -j ACCEPT
    If this does work at that point for the command you need to run, then please save the rules:

    Code:
    service iptables save
     
  7. deflime

    deflime Registered

    Joined:
    Aug 5, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    That worked. Now in OUPUT. Thanks a lot for that.

    The application is still serving errors, although it seems to hang a bit before the error, perhaps suggesting it is in touch with the 3rd party server, before it would just provide an instant error. I've sent a quick email to them to see if there's anything wrong on their end.

    At this point it sounds like the server should be ready for the connection, and I take it, it doesn't matter that the connection is refused when I run the telnet.
     
Loading...

Share This Page