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.

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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page