Jump to content

Plesk Server Module | NAT


Recommended Posts

Hello all,

Posting as I'm not getting very far with support at the moment. I have 2 environments - one for production and another for testing/dev. Both are set up the same in that the Plesk servers are added using their hostname and public IP address. The Plesk servers are NAT'd and per Plesk support configured correctly. The default IP for eth0 is the private/internal address - and then via the Plesk interface, the public IP address is assigned. In both the prod and test environments - Plesk works as expected. 

The issue I'm having on my new test environment is that when trying to provision the account on Plesk, the module fails because it us using the public IP for ip_address - where in Plesk, the ip_address value is the private IP address (and public is stored as public_ip_address. I can change the server IP in WHMCS instead to the private address - and everything works as expected when provisioning. However - anywhere WHMCS references the service IP to the client (like emails or frontend) it's the private address which is of no use to them.

What's odd is that in my production environment - the servers are setup the exact same way - but provisioning works? For example, in WHMCS the server IP address is public, and in Plesk it's private. 
So,  I enabled module logging to see what's difference, I noticed that in production, there is an additional request sent when creating a new account:

Request:

<?xml version="1.0" encoding="UTF-8"?><packet version="1.6.3.2"><!-- Copyright 1999-2016. Parallels IP Holdings GmbH. -->
<ip>
    <get/>
</ip>

Response:

Array
(
    [@attributes] => Array
        (
            [version] => 1.6.3.2
        )

    [ip] => SimpleXMLElement Object
        (
            [get] => SimpleXMLElement Object
                (
                    [result] => SimpleXMLElement Object
                        (
                            [status] => ok
                            [addresses] => SimpleXMLElement Object
                                (
                                    [ip_info] => SimpleXMLElement Object
                                        (
                                            [ip_address] => 10.18.18.11
                                            [netmask] => 255.255.255.0
                                            [type] => shared
                                            [interface] => eth0
                                        )
                                )
                        )
                )
        )
)

It then follows this request with another plesk_createaccount request - but unlike in testing it uses the private IP from above - so provisioning works since it's a match. I'm assuming that in this case - it's actually using the IP that was returned from the request and not the one that's set in the WHMCS server ip address field???

So my questions is - what triggers the Get IP request? And why wouldn't that request be sent from myWHMCS test install? 

Does anyone else have experience with getting WHMCS to provision Plesk accounts when the server is NAT'd?

Link to comment
Share on other sites

Thanks @steven99 for the reply. I've had Plesk support verify as well. Both production and testing use the same configuration: 

In Plesk -> Tools and settings -> IP Addresses -> the private IP has a public IP set. I've also verified this by using the following command:

sudo plesk db "SELECT id,ip_address,public_ip_address FROM IP_Addresses;"

This returns the expected Private IP and Public IP 

Link to comment
Share on other sites

Quote

 

I have both a prod and dev instance of WHMCS. With the new dev instance, I have to use the private IP because that's what Plesk returns. In the old prod instance, I have the public IP set - and even though Plesk still returns the private it is somehow working. Support has been unable to answer why. The only difference I noticed in the two instances is that in prod, there is extra 'IP GET' request being sent. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated