latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

IP Addresses
IPv4 Address Settings

Add IP addresses

This function adds an IPv4 address or addresses to the server. When you add an IP address, the system attempts to add an alias of that IP address to the main network interface. This process rebuilds the IP address pool, which resides in the /etc/ipaddrpool file. The system stores IP addresses within the /etc/ips file. The ipaliases service activates those IP addresses when the server starts.

get/addips

Query parameters

ipsstring required

The IPv4 address or address range in Class C CIDR format.

netmaskstring ipv4 required
Example:255.255.255.0

The IPv4 address' netmask.

Note:

If the ips parameter is in Class C CIDR format, the range mask must be a value from 24 through 30.

excludesstring

An IPv4 address or comma-delimited list of IPv4 addresses to exclude.

Note:

If you do not specify a value, the function does not exclude any IPv4 addresses.

Response

HTTP Request was successful.

Example response

{
  "metadata": {
    "command": "addips",
    "output": {
      "messages": [
        "eth0:cp1 is now up. 192.168.0.20/255.255.255.0 broadcast 192.168.0.255 has been added."
      ]
    },
    "reason": "Success",
    "result": 1,
    "version": 1
  }
}