Add IPv6 address range to accounts

This function assigns an IPv6 address to one or more accounts.

Note:

You must perform at least one of the following actions before you call this function:

  • Use WHM's IPv6 Ranges interface (WHM >> Home >> IP Functions >> IPv6 Ranges) or WHM API 1's ipv6_range_add function to add one or more IPv6 address ranges for use as dedicated IPv6 addresses.
  • Use WHM's Basic WebHost Manager Setup interface (WHM >> Home >> Server Configuration >> Basic WebHost Manager Setup) or modify the /etc/wwwacct.conf file to add a shared IPv6 address to the server.
  • For all of cPanel & WHM's features to function properly on IPv6, the cpsrvd daemon must listen on IPv6 addresses. To enable this functionality, select On for the Listen on IPv6 Addresses setting in the System section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).

Important:

When you disable the Web Server role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
range
required
string

The IPv6 address range's name.

Note:

The range name SHARED will assign the server's shared IPv6 address to the account(s).

Example: range=Hosting_IPv6_Block
user
required
string <username>

A comma-delimited list of account names.

Example: user=user1,user2,user3
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/ipv6_enable_account
Request samples
whmapi1 --output=jsonpretty \
  ipv6_enable_account \
  user='user1,user2,user3' \
  range='Hosting_IPv6_Block'
Response samples
application/json
{
  • "data": {
    • "fail_cnt": 2,
    • "failures": {
      • "brain": "The “brain” account does not exist.",
      • "pinky": "The “pinky” account does not exist."
      },
    • "ipv6": {
      • "chewie": "2001:0db8:1a34:56cf:0000:0000:0000:0000",
      • "cptest": "2001:0db8:1a34:56cf:0000:0000:0000:0001",
      • "domain1": "2001:0db8:1a34:56cf:0000:0000:0000:0002"
      }
    },
  • "metadata": {
    • "command": "ipv6_enable_account",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}