How to set ip address mapping in Plesk 12.5 using XML API requests?

Created:

2016-11-16 12:48:53 UTC

Modified:

2017-04-24 12:10:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to set ip address mapping in Plesk 12.5 using XML API requests?

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.5 for Windows

Question

Plesk 12.5 introduces such new feature as ip address mapping for cases when Plesk is behind NAT. How to set ip address mapping using XML API requests.

Answer

In order to add new ip address to Plesk with mapping to public ip address, use the following API request:

<packet version ="1.6.7.0">
<ip>
<add>
<ip_address>192.168.0.1</ip_address>
<netmask>255.255.255.0</netmask>
<type>shared</type>
<interface>Ethernet</interface>
<public_ip_address>1.1.1.1</public_ip_address>
</add>
</ip>
</packet>

In order to set ip address mapping for existing ip address, use the following API request:

<packet version="1.6.7.0">
<ip>
<set>
<filter>
<ip_address>192.168.0.1</ip_address>
</filter>
<public_ip_address>1.1.1.1</public_ip_address>
</set>
</ip>
</packet>
Have more questions? Submit a request
Please sign in to leave a comment.