I have a Centos7 VM instance running in Azure. It has a public IPv4 address reachable from the internet. I would like to add a public IPv6 address to this instance's network interface but I cannot figure out how to do this. There does not seem to be a way to add it to the interface from the portal. I have consulted the documentation but it seems to have conflicting information that suggests it is not possible, or that it can only be achieved by creating a new VM. I have attempted this also but again could not get it to work. Information I have found on Google appears to be outdated.

I would appreciate it very much if someone could advise on whether it is possible to have both public IPv4 and IPv6 addresses allocated to the same VM, and if so how this might be acheived. Thanks!


I believe that you are not able to change your current NIC to allow IPv6, so you must either redeploy your VM or attach a new NIC IPv6 and delete the old one. Also all SKUs for public IP (IPv4 and IPv6) must be the same (Dynamic or Standard). Don't forget to keep save your VM's disks to avoid any mistake. All steps to achieve this configuration are below.

I suggest you to test it in staging before changing your production.

1 - configure an address space IPV6 for your VNET address space

2 - configure your current subnet where this VM lives to allow IPv6 subnet

3 - Your NIC looks like as this picture. Configure both IPv4 and IPv6 for this NiC. nic

4 - Your VM shows up both IP (IPv4 and IPv6) vm information

  • Hi, thank you for taking the time to answer my question. I followed your instructions (the public IPs must both be Standard SKUs) and created a new NIC which was then attached to the existing VM. The old NIC was deleted. Unfortunately, the VM is unable to route any IPv6 packets to the outside world. I can ping the assigned private IPv6 address and that is it. I have attempted to configure the network using /etc/sysconfig/network-scripts/ifcfg-eth0 but to no avail. Would there be any Azure-specific config needed to get this working, or could there be something I have missed?
    – EmToro
    Apr 29 '20 at 10:13
  • Most likely it is a Centos OS configuration. Your private IPV6 is working, so public IPV6 should work as well, it is "nated" from public ip to private ip. When you have more than one IP, it must be configured inside virtual machine. I'm not a "linux" guy, so not sure how it works, try to find how to enable IPv6 for Centos. Another test you can review your NSG if it is blocking your IPv6 from outside (internet). A good test is to use Network Watcher to verify if your traffic flows correctly, it shows up your NGS rules, next hop and capture packet.
    – Taguada
    Apr 29 '20 at 17:26
  • 1
    I had to stop the VM, detach the old NIC then Attach the new NIC and start the VM to make it work Feb 4 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.