Get Virtualizor

Create IP Pool

An IP Pool is a collection of IPs which can be used to create VPS. You should create an IP Pool so that there are no connectivity issues for the VPSes you create. The Create IP Pool API allows you to create an IP pool on your server. You can define parameters like the Netmask, Gateways and Name Servers for the IP pool. The API response will return "done" as "1" on successful creation of the IP pool.

For adding Subnetted IPs on Hetzner Server please refer the Hetzner NAT guide and for additional IPs please refer the Hetzner Additional IPs guide

See also: Create IP Pool Guide

HTTP Request



actGETaddippoolThe action specified to carry out operation and return success after ip pool has been addedYes
iptypePOSTInt4 for IPv4, 6 for IPv6Yes
seridPOSTarrayAn array containing server IDsYes
ippool_namePOSTtextThe name for the IP PoolYes
gatewayPOSTIntThe gateway for the IP poolYes
netmaskPOSTIntThe netmask for the IP PoolYes
ns1POSTIntName server address 1Yes
ns2POSTIntName server address 2 if anyYes
firstipPOSTIntThe first IP of the IP rangeYes
lastipPOSTIntThe last IP of the IP rangeYes
natPOST1/0On or off, if nat is supported( Xen and KVM )No
ipsPOSTarrayAn array containing IPs to be addedNo
macsPOSTarrayAn array containing mac addresses for the ipsNo
routingPOST1/0If set then the routing option for the ip pool will be enabledNo
internalPOST1/0If set then the IPs will be used by VPSes for internal communication. Do not check this, if this IP Pool is for Public IPsNo
internal_bridgePOSTtextName of the internal IP bridgeNo
vlanPOST1/0If checked, vlan networking will be usedNo
vlan_bridgePOSTtextName of the vlan bridgeNo
mtuPOSTIntSpecify the Maximum Transmission Unit in bytesNo
uidPOSTIntSpecify the User ID for which you want to assign the pool (Only cloud user can be assigned with billing enabled, internal pool cannot be assigned) (since

Sample Code



    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $post = array();
    $post['iptype'] = 4;
    $post['serid'] = 0;
    $post['ippool_name'] = 'test_api_ipv4';
    $post['gateway'] = '';
    $post['netmask'] = '';
    $post['ns1'] = '';
    $post['ns2'] = '';
    $post['firstip'] = '';
    $post['lastip'] = '';
    $post['routing'] = 1;       //This is same for both IPv4 and IPv6
    $post['nat'] = 'on';

    $output = $admin->addippool($post);



  "title": "Add IP Pool",
  "done": {
    "ippid": "7",
    "range": {
      "465": "",
      "466": "",
      "467": "",
      "468": "",
      "469": "",
      "470": "",
      "471": "",
      "472": ""
    "done": 1
  "timenow": 1535370224,
  "time_taken": "0.279"
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list