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.

curl to own host not working

Discussion in 'General Discussion' started by mitch2k, Feb 21, 2015.

  1. mitch2k

    mitch2k Member

    Joined:
    Dec 5, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have setup a new cpanel server, but for some reason, curl to itself is not working. For instance:

    Code:
    curl https://10.202.100.12:443 -k
    is working but

    Code:
     curl https://domainontheserver.com:443 -k
    is not and gives:
    Code:
    root@bezawebs02 [/]# curl https://domainontheserver.com:443 -k -v
    * About to connect() to domainontheserver.com port 443 (#0)
    *   Trying <public ip>.. Connection timed out
    * couldn't connect to host
    * Closing connection #0
    curl: (7) couldn't connect to host
    Since I'm using -k, I don't think this is a certificate issue. Also, from the server, I can ping to domainontheserver.com, so I don't think it is a DNS issue.

    curl https://domainontheserver.com:443 -k -v from another server works perfect.

    I am using this cpanel server behind a firewall. Could this be a nat translation issue (altough I would think the traffic stays inside the server since it is authoritative for that domain).
    How can I troubleshoot this?

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    It's possible your firewall and NAT configuration is causing this problem. Is there any reason you must use the public domain name instead of the local IP address? If so, check your network routing configuration to verify it's setup correctly.

    Thank you.
     
Loading...

Share This Page