You have found that the IPv6 address used for outgoing IPv6 connections keeps changing to various IPv6 addresses.
It is possible for the outgoing IPv6 address to change if your server's network configuration has a range of more than one IPv6 address configured in the IPV6ADDR line of the network-scripts configuration file.
A key consideration when fixing your IPV6ADDR configuration line is that you must use CIDR notation, and the CIDR notation must end with /128 to signify a single IPv6 address.
If you just add an IPv6 address without CIDR notation, it will default to a /64 range which will continue to cause problems with your outgoing IP changing.
You can use the following steps to check your configuration and resolve this issue. Please keep in mind that the process of editing your network configuration introduces the risk of accidentally and completely disconnecting your server from the network. These kinds of changes should only be done by a network or systems administrator with the skills, training, and expertise required to do so for you. If you do attempt to make this change, you must do so from console access. Failure to make use of console access can result in extended downtime for your entire server. If you're not sure what console access means, please refer to the following resource:
1. Login to the server via Console Access as the root user. DO NOT use SSH or Terminal.
2. Run the following command to generate a list of the available network device names on your server. Here is a typical example, although your server may have different names:
# find /sys/class/net/ -type l -printf "%f\n"
The lo name refers to the loop-back interface. You may ignore it for the purposes of this issue.
If there is only one interface name listed other than lo, make note of that and move to step 3 right now.
If you have more than one interface name listed there other than lo, you'll need to find out which interface is the one that your server uses for it's general traffic. Typically you can use the following command and look for your server's IP address. Then look at the interface that it is associated with. That is most likely the interface name that you need to make note of:
If this step is confusing, or if you still are not sure what interface name is used for your server's traffic, you must reach out to a network administrator with the skills, training, and expertise required to modify your configuration for you. Uncertainty when making this change can end up disconnecting your server from the network.
3. Make a backup of the network configuration script for the interface name that you made note of in step 2. In the below example the filename portion "INTERFACENAME" would be replaced with your interface name:
cp -v /etc/sysconfig/network-scripts/ifcfg-INTERFACENAME /root/
4. Now open the network configuration script with your favorite editor
5. Look for the "IPV6ADDR" configuration
6. Check it to see if it matches your main shared IPv6 address with "/128" at the end. An example would look similar to this:
If your configuration does not have /128 at the end, that means that you have multiple IP addresses configured as a range which is why your outbound IP address keeps changing. Please note that if you leave off the CIDR notation at the end entirely (no /### part), it will default to /64 which is a very large number of IP addresses.
7. If your IP address is already configured properly, you should not experience issues with the outbound IP address changing.
8. If your IP address is not configured properly yet, update it to the correct IP address. If you are not sure what the correct IP address is, you must contact your datacenter, hosting provider, or systems administrator for assistance.
9. Once you have updated the configuration, restart the network configuration with the following command:
/usr/bin/systemctl restart network
If the network service fails to start, you may restore the backup configuration that you created in step 3 and then restart the service once more to restore network connectivity. Then reach out to a network or systems administrator for help with editing this configuration.
10. If the network service restarted without any errors, login to WHM as the root user
11. Navigate to: WHM >> Home >> Server Configuration >> Basic WebHost Manager® Setup
12. Ensure that the same IPv6 address has been added to that interface
13. Navigate to: WHM >> Home >> IP Functions >> IPv6 Ranges
14. Ensure that you have configured your gateway and IPv6 Ranges properly in this interface. IMPORTANT: Read the following documentation page in its entirety, from top to bottom, before attempting to edit this interface:
This guide is based on the following documentation: