How to enable IPv6 on your server Print

  • 0

Introduction

Before you can add IPv6 addresses to your server using the WHM interface, the initial address must be configured on your server's networking device to properly function. This article will guide you through the process for adding an IPv6 shared address to your server. If you do not yet have an IPv6 address assigned by your hosting provider or data center, you will need to consult with them first before proceeding with the steps below.

 

Procedure

Please note that making incorrect edits to your server's network configuration may cause your server to become unreachable. If you have any doubts about performing these operations, please consult your hosting provider or administrator before making any changes.

  1. Connect to your server using SSH as the root user.
  2. Using a command-line text editor, edit the network configuration file at the following path:

    /etc/sysconfig/network
  3. Change the IPv6 entry to "yes", or add the entry to the bottom of the file if it does not exist:

     NETWORKING_IPV6=yes
  4. Open the device configuration file here:

    /etc/sysconfig/network-scripts/ifcfg-eth0
  5. Change or add the following entries to enable IPv6. You should have received an IPv6 address for your server as well as an IPv6 gateway address from your hosting provider or data center:

    IPV6INIT=yes
    IPV6ADDR=[add the assigned IPv6 address here]
    IPV6_DEFAULTGW=[add the IPv6 gateway address here]
  6. (Optional) Additionally, to ensure the source IPv6 address matches the shared IPv6 address, a manual route may be necessary. Create the custom route file:

    /etc/sysconfig/network-scripts/route-ethX

    For example, add the route using your shared IPv6 address in the file.

    default via GATE::WAY::IP dev ethX src MAIN::SHARE::IPV6 metric 1

    Please note that you will need to replace "GATE::WAY::IP" with your IPv6 gateway address. Replace "ethX" with the interface name where the IPv6 addresses are allocated. This is generally the same device name as "ETHDEV" in the cPanel "/etc/wwwacct.conf" configuration file. Replace "MAIN::SHARE::IP" with your main shared IPv6 address.

  7. Restart your network service to read the changes and enable IPv6:

    /usr/bin/systemctl restart network

 

Additional Resources

cPanel Docs: How to Get Started with IPv6

How to add an IPv6 range


Was this answer helpful?
Back

Send Message