cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

IP & Network → Add IP addresses

AI-generated

Summary

Add one or more IPv4 addresses or address ranges to the server network configuration in WHM using Class C CIDR format.

Inputs

  • Ips (required) — The IPv4 address or address range in Class C CIDR format to add to the server network.
  • Netmask (required) — The netmask for the IPv4 address or range; if using Class C CIDR format, must be between 24 and 30.
  • Excludes — Optional comma-delimited IPv4 addresses to exclude from the specified range when adding IPs.

Output shape

a single response object from the WHM API indicating success or failure of adding the IP addresses.

The API response should be checked for errors as per WHM's status or error fields. Output includes any returned data from the WHM 'addips' API call.

Examples

Example 1: Add a single Class C CIDR IP address range excluding specific IPs

Set 'Ips' to the CIDR range, define 'Netmask' between 24 and 30, and optionally specify 'Excludes' to omit certain IPs from addition.

Links

Discussion