Good afternoon, please tell me is it possible to assign an ipv6 address to my virtual machine?
Yes, we provide the option to use an IPv6 subnet.
To order, open the control panel, select the desired server in the "My Servers" section and go to the "IP" tab. You can order the service using the "Order IPv6" button.
In a moment, you will see your IPv6 subnet in the same section of the control panel.
Next, you need to add each IPv6 separately in the network settings of the operating system used on the server.
For example, if you have received a 2a10:9200:0:332::/64, then the first subnet address is 2a10:9200:0:332:: , the second 2a10:9200:0:332::1 and so on up to the last IPv6 of this subnet 2a10:9200:0:332:ffff:ffff:ffff:ffff
Consider the process of adding a single IPv6 address, for example 2a10:9200:0:332::1. In all cases, you also need to use IPv6 DNS, you can use public DNS from Google.
Debian 9, Debian 10, Debian 11, Ubuntu 16.04
Editing a file on the server
/etc/sysconfig/network-scripts/ifcfg-eth0 for Centoc 7
/etc/sysconfig/network-scripts/ifcfg-ens3 for Centos 8
and we write the following lines at the end of it
IPV6ADDR="2a10:9200:0:332::1"
IPV6_DEFAULTGW="fe80::1"
IPV6INIT=yes
In this case, 2a10:9200:0:332::1 - your IPv6 address, fe80::1 is the gateway.
After restarting the server, we will be able to check the work by running the ping6 command google.com
Edit the file /etc/netplan/01-netcfg.yaml and bring the ens3 section to this form
ens3:
addresses: [ "IPv4/24" ]
addresses: [ "2a10:9200:0:332::1/64" ]
nameservers:
addresses:
- "8.8.8.8"
- "2001:4860:4860::8888"
routes:
- to: default
via: IPv4
on-link: true
- to: ::/0
via: fe80::1
on-link: true
In this case, 2a10:9200:0:332::1 is your IPv6 address, fe80::1 is the gateway. We do not change the values for IPv4.
After the changes you need to run the command
netplan apply
After rebooting the server, we can check the operation by running the command ping6 google.com
Editing the file /etc/netplan/01-netcfg.yaml and bring the ens3 section to this form
ens3:
addresses:
- IPv4/24
- 2a10:9200:0:332::1/64
gateway4: IPv4
gateway6: fe80::1
In this case, 2a10:9200:0:332::1 - your IPv6 address, fe80::1 is the gateway. We do not change the values for IPv4.
After the changes, you must run the command
netplan apply
And reboot the server.
Edit the /etc/network/interfaces file by adding the following entries
iface eth0 inet6 static
address 2a10:9200:0:332::1
netmask 64
gateway fe80::1
In this case, 2a10:9200:0:332::1 - your IPv6 address, fe80::1 is the gateway.
After making changes, restart the network with the command
/etc/init.d/networking restart
Debian 9, Debian 10, Debian 11, Ubuntu 16.04
In the /etc/network/interfaces file, add
iface ens3 inet6 static
address 2a10:9200:0:332::1
netmask 64
gateway fe80::1
In this case, 2a10:9200:0:332::1 - your IPv6 address, fe80::1 is the gateway.
Rebooting the network or the server as a whole
/etc/init.d/networking restart
Opening it Control Panel -> Network and Sharing Control Center and select Change Adapter settings
Right-click on our network connection and select "Properties". Next, select "Internet Protocol version 6 (TCP/IPv6)" and click on the "Properties" button again, enter the parameters of the previously received IPv6.
In this case, 2a10:9200:0:332::1 - your IPv6 address, fe80::1 is the gateway.