How to Get Started With IPv6


Last modified: February 22, 2024

Overview

Warning:

Due to networking requirements, you cannot run an IPv6-only cPanel & WHM server. Your server must have at least one IPv4 address.

To use IPv6 on your cPanel & WHM server, you must acquire IPv6 addresses and add them to your server. You can then assign the server’s shared IPv6 address and assign IPv6 addresses to the desired users.

Get started with IPv6

Acquire an IPv6 range

To acquire an IPv6 address range, contact your Internet Service Provider (ISP). Most ISPs assign IPv6 addresses in large blocks or ranges.

We recommend that you request IPv6 addresses for the following purposes:

  • A single IPv6 address for the server itself, which you can assign to individual accounts as a shared IP address. Make certain that you request an IPv6 address that does not exist within the requested IPv6 range. The system blocks shared IPv6 addresses that exist within IPv6 ranges.
  • An IPv6 range to use to assign individual dedicated IPv6 addresses to accounts.
Important:

You must reserve the single IPv6 address in WHM’s IPv6 Ranges interface (WHM » Home » IP Functions » IPv6 Ranges).

We recommend that you request an IPv6 address range with a /64 network portion, the most common network portion for the shared hosting industry. However, network portions may be as low as /48, or as high as /128, which represents a single IPv6 address.

When you acquire the IPv6 addresses, update your Reverse DNS entries. Some ISPs will update these entries for you, while others require you to maintain them.

Add a single IPv6 address to your server

Warning:
  • WebPros International, LLC recommends that only experienced system administrators attempt to perform the steps in this section.
  • WebPros International, LLC is not responsible for any data loss that an attempt to perform these steps causes.

When you acquire IPv6 addresses, select one IPv6 address to assign to your server. Then, perform the following actions in your CentOS server:

  1. From the command line as the root user:
    1. Edit the /etc/sysconfig/network file to add the following line:
       NETWORKING_IPV6=yes 
    2. Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file to add the following IPv6 values:
      1
      2
      3
      
      IPV6INIT=yes
      IPV6ADDR=[add the assigned IPv6 address here]
      IPV6_DEFAULTGW=[add the IPv6 gateway address here]
    3. Return to the command line. Restart the network with the /usr/bin/systemctl restart network command.
  2. In WHM’s interface:
    1. Enter the IPv6 address in the The IPv6 address (only one address) to use to set up shared IPv6 virtual hosts. setting in WHM’s Basic Webhost Manager Setup interface (WHM » Home » Server Configuration » Basic WebHost Manager® Setup). You can find this setting in the Basic Config section.
    2. Enter the IPv6 resolver in the Resolver Configuration interface (WHM » Home » Networking Setup » Resolver Configuration). Enter at least one IPv6 DNS resolver in this interface and click Continue. The interface will indicate whether the configuration succeeded. This step adds the IPv6 resolver to the /etc/resolv.conf file.
  3. To verify your configuration, ping another IPv6 server with the following command:
    ping6 ipv6.google.com
    • If IPv6 functions on your server, this command’s output resembles the following example:
      1
      2
      3
      4
      
      PING ipv6.google.com(2001:4860:b002::68) 56 data bytes
      64 bytes from 2001:4860:b002::68: icmp_seq=0 ttl=59 time=58.4 ms
      64 bytes from 2001:4860:b002::68: icmp_seq=1 ttl=59 time=56.4 ms
      64 bytes from 2001:4860:b002::68: icmp_seq=2 ttl=59 time=62.1 ms
    • If the command’s output does not resemble this example, IPv6 is not functioning on your server. You must resolve this issue before you can use cPanel & WHM with IPv6.

Ping the IPv6 server from another server

To confirm that other servers can reach your server via IPv6, run the following command as the root user on another server, where 2001:db8:10fe::5000 represents your server’s IPv6 address:

ping6 2001:db8:10fe::5000

If IPv6 functions on your server, this command’s output resembles the following example:

1
2
3
4
PING 2001:0db8:85a3::8a2e:0370:7334 56 data bytes
64 bytes from 2001:db8:10fe::5000: icmp_seq=1 ttl=62 time=0.847 ms
64 bytes from 2001:db8:10fe::5000: icmp_seq=2 ttl=62 time=0.994 ms
64 bytes from 2001:db8:10fe::5000: icmp_seq=3 ttl=62 time=0.909 ms

If the command’s output does not resemble this example, IPv6 is not functioning on your server. You must resolve this issue before you can use cPanel & WHM with IPv6.

Ensure that the cpsrvd daemon listens on IPv6

Navigate to the System section of WHM’s Tweak Settings interface (WHM » Home » Server Configuration » Tweak Settings) and select On for the Listen on IPv6 Addresses setting.

This setting ensures that the cpsrvd daemon listens on IPv6 in addition to IPv4.

Configure the server’s shared IPv6 address

To configure the server’s shared IPv6 address, perform the following steps:

  1. Navigate to WHM’s Basic WebHost Manager Setup interface (WHM » Home » Server Configuration » Basic WebHost Manager Setup).
  2. Enter the desired shared IPv6 address in the The IPv6 address (only one address) to use to set up shared IPv6 virtual hosts. text box. After you configure this setting, BIND automatically begins to listen for DNS requests via IPv6.
  3. Click Save Changes at the bottom of the interface. A confirmation message will appear.
Important:

An IPv6 address range cannot contain a server’s shared IP address. The system will not allow you to set a shared IP address that exists within any configured IPv6 address range.

To assign a shared IPv6 address to the server, add the address in WHM’s IPv6 Ranges interface (WHM » Home » IP Functions » IPv6 Ranges). If you perform this action, the system will not block the shared IPv6 address, even if it exists within an IPv6 range.

Add IPv6 ranges to the server’s available IP addresses

To add IPv6 address ranges from which you can assign dedicated IPv6 addresses, use WHM’s IPv6 Ranges interface (WHM » Home » IP Functions » IPv6 Ranges).

To add a range of IPv6 addresses, perform the following steps:

  1. Click Add Range.
  2. Enter a name for the IPv6 address range in the Range Name text box. This name must contain 64 characters or fewer.
  3. Enter the IPv6 address range in the Range text box. IPv6 address ranges consist of a shortened IPv6 address, a slash (/), and a number that indicates the network portion of the IPv6 address range. For example:
    2001:0db8:1a34:56cf::/64
    • Do not add an IPv6 address range that contains the main IPv6 address that you set in WHM’s Basic WebHost Manager Setup interface (WHM » Home » Server Configuration » Basic WebHost Manager® Setup).
    • You must add your gateway individually before you add the full gateway range and set the gateway to RESERVED so that the system does not assign this IP address to an account. For example:
      1
      2
      
      2001:0db8:1a34:56cf::/128 RESERVED
      2001:0db8:1a34:56cf::1/128 RESERVED
  4. Select one of the following range types from the Range Type menu:
    • Available — You can distribute the addresses in this range to the users on your server.
    • Reserved — You cannot distribute the addresses in this range to the users on your server. If you select Reserved, WHM’s Assign IPv6 Address interface (WHM » Home » IP Functions » Assign IPv6 Address) will not list the range.
  5. Enter a description of the IPv6 address range in the Range Notes text box. This description must contain 256 characters or fewer.
  6. Click Add Range to add the IPv6 address range, or click Cancel to close the form.

Assign dedicated IPv6 addresses to individual accounts

To assign addresses to individual users, navigate to WHM’s Assign IPv6 Address interface (WHM » Home » IP Functions » Assign IPv6 Address) and select the desired cPanel account.

To assign an IPv6 address to the selected account, perform the following steps:

  1. Select the desired IPv6 address range from the Enable this account with an IPv6 address from the selected range menu.
    • You must select a range that includes available addresses.
    • To assign the server’s shared IPv6 address to an account, select The server’s shared IPv6 address. This address functions as a shared, rather than dedicated, address. Your server may use a Stateless Autoconfigured Address (SLAAC) address that your MAC address determines. This address changes if your hardware changes. For example, if you replace your Ethernet card, the new card receives a new IPv6 address. This causes the old address’s VirtualHosts entry in httpd.conf to use the wrong IPv6 address.
  2. Click Enable Account. When you enable IPv6 on an account, the system performs the following actions:
    • Binds that IPv6 address to your server.
    • Adds an AAAA record for the account to the primary DNS zone.

An enabled account maintains its IPv6 address information even if you enable it again with a different IPv6 address range.

Configure additional IPv6 settings on the server

We recommend that you configure the following additional IPv6-related settings on your cPanel & WHM server:

  • Add IPv6 addresses to any other desired Exim configuration settings in WHM’s Exim Configuration Manager interface (WHM » Home » Service Configuration » Exim Configuration Manager).
  • Enable the Enable IPv6 setting in WHM’s Mailserver Configuration interface (WHM » Home » Service Configuration » Mailserver Configuration).
  • Add any remote mail servers that use IPv6 addresses in WHM’s Configure Remote Service IPs interface (WHM » Home » IP Functions » Configure Remote Service IPs).

Troubleshoot issues

For help with IPv6 problems, read our Troubleshoot IPv6 Problems documentation.

Additional Documentation