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

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 12.5 for Windows

Created:

2016-11-16 12:48:53 UTC

Modified:

2016-12-21 19:16:43 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?

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.