HOW CAN I ADD IPV6 NAMESERVERS ON MY CENTOS/ORACLE LINUX VM?
CentOS/Oracle Linux VMs that are created from official ~okeanos Images lack out-of-the-box addition of IPv6 nameservers, since NetworkManager does not handle by default the configuration of IPv6 interfaces. As a result, you may not be able to visit IPv6-only sites.
The user is therefore faced with two options:
a. Enable NetworkManager to handle the configuration of an IPv6
interface with the help of the keyfile plugin
b. Consult the Red Hat page
and create the appropriate configuration files for the IPv6 interface
(unsupported by ~okeanos team).
In this guide, we will go with option (a).
Attention: If your VM is a
CentOS VM, before we begin, ensure that you have followed these instructions.
Then, you can proceed with the following steps.
Note: The NetworkManager version that ships with CentOS/Oracle Linux (v0.8.1) is very old and it lacks bug fixes and general improvements that have been added in newer versions. Red Hat after all, explicitly states for the Fedora project that it will receive reasonably good IPv6 support only for NetworkManager versions from v0.9.6 and up.
Open DHCPv6 port (only for VMs created before 26/2/2014)
To open the DHCPv6 port, add the following rules:
ip6tables -A INPUT -p udp --dport 546 -j ACCEPT /etc/init.d/ip6tables save
Allow NetworkManager to configure an IPv6 interface
Note: We will assume for the next part of the guide that the IPv6 interface is eth0. If your IPv6 interface is other, change eth0 with the name of your interface.
In order to explicitly instruct NetworkManager to handle the configuration of an IPv6 interface, you need to know its MAC address. You can find the MAC address of an interface by doing:
ifconfig eth0 | grep HWaddr
and your MAC address should be next to "Hwaddr":
eth0 Link encap:Ethernet HWaddr AA:00:0B:A5:51:5B
Moreover, you will need a UUID that you can generate with the following command:
uuidgen
and the expected output should be something like this:
ce3e4dd0-c1a8-4f66-b586-262a0f4cf8ae
Create a configuration file for your card. The configuration file should be readable only by root, otherwise NetworkManager will ignore it for security reasons:
touch /etc/NetworkManager/system-connections/eth0.conf chmod 0600 /etc/NetworkManager/system-connections/eth0.conf
Next, using your favorite text editor, add the following lines to the created file:
[802-3-ethernet] mac-address=<MAC_ADDRESS> [connection] id=Auto eth0 uuid=<UUID> type=802-3-ethernet [ipv6] method=auto
where <MAC_ADDRESS> and <UUID> are the values that we have calculated above, namely AA:00:0B:A5:51:5B and ce3e4dd0-c1a8-4f66-b586-262a0f4cf8ae respectively.
Enable the keyfile plugin
Using your favorite text editor, edit /etc/NetworkManager/NetworkManager.conf and append the keyfile plugin to the list of plugins in [main] like so:
[main] plugins=ifcfg-rh,keyfile
Finally, restart NetworkManager with:
service NetworkManager restart
CYCLADES USER GUIDE
- How to create a VM?
- How do I connect to a VM?
- How do I manage my VM?
- How can I resize the CPU/RAM of an existing VM?
- How can I attach/detach an IP on a running VM?
- How can I add extra disks to my VMs?
- How can I detach an extra disk from a VM?
- How can I add tags to my VMs?
- How can I assign my VM to a project?
- What are SSH keys and how can I use them?
- What are private networks?
- What is a firewall and which one should I choose?
- How to create VMs from custom images?
- How can I access all my VMs using one public IP (NAT)?
- How can I update the VirtIO drivers of my Windows VM?
- How can I add IPv6 nameservers on my CentOS/Oracle Linux VM?