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!

API requests over internal network

Discussion in 'Workarounds and Optimization' started by Ilyas, Jan 20, 2017.

  1. Ilyas

    Ilyas Registered

    Joined:
    Dec 28, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Antwerp, Belgium
    cPanel Access Level:
    Root Administrator
    I have an application that uses th cpanel API. I would like to make those API request from my internal network. I've set everything up to do some testing but I can't seem to connect to the API over the internal network.

    Does anyone know how to configure cPanel to accept these requests. The setup is as followed:

    cPanel config
    eth0 -> primary IP
    eth1&2 -> local network to communicate with our private cloud
    eth3 -> 172.16.0.40 (the local network that I would like to use

    Application Server Config:
    eth0 -> primary IP
    eth1&2 -> local network to communicate with our private cloud
    eth3 -> 172.16.0.100 (the local network that I would like to use

    /etc/hosts on the application server

    174.16.0.40 hostname serverxx.domain.com

    I can ping the cpanel server from the application server using it's FQDN but when I connect to the API or try to curl the WHM login url I get no return.

    What could be causing this?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,408
    Likes Received:
    1,953
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you let us know the specific method you are using to make the API connection? Have you tried using the local IP address as the host?

    Thank you.
     
    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