Article

Table of Contents
Theme:
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $300 by adding new articles!

Configuring IPv6 on CentOS

Last Updated: Wed, Oct 28, 2020
CentOS FAQ Networking

Introduction

Vultr supports IPv6 for all VPS and Bare Metal instances. To enable IPv6, use either of these methods:

  • Select Enable IPv6 in the Additional Features section when deploying a new instance.
  • Use this guide to add IPv6 support, or add a secondary address, to a deployed instance.

Add IPv6 to an Instance

  1. IPv6 autoconfiguration depends on ICMP protocol. Please verify you haven't blocked ICMP in the OS firewall.
  2. Navigate to the Settings tab for the instance.
  3. Select the IPv6 menu.
  4. Click the Assign IPv6 Network button.

    Assign IPv6

  5. Restart the server via the Vultr Customer Portal. Important: rebooting via SSH doesn't activate the new network.

CentOS 8

Dynamic configuration

Populate /etc/sysconfig/network-scripts/ifcfg-ens3 with:

TYPE="Ethernet" 
DEVICE="ens3" 
ONBOOT="yes" 
BOOTPROTO="dhcp" 
IPV6INIT="yes" 
IPV6_AUTOCONF="yes" 
IPV6ADDR_SECONDARIES="2001:db8:1000::100 2001:db8:1000::200" 
  • The primary IPv6 is dynamic.
  • 2001:db8:1000::200 is the optional static secondary IPv6. Remove the IPV6ADDR_SECONDARIES line if a secondary address isn't required, or replace the example with an address in your IPv6 subnet.

Restart the connection, or reboot.

nmcli con load /etc/sysconfig/network-scripts/ifcfg-ens3
nmcli con up 'System ens3'

CentOS 6 through 7

Add the following lines to /etc/sysconfig/network-scripts/ifcfg-eth0.

IPV6INIT="yes" 
IPV6ADDR="2001:db8:1000::100/64" 
IPV6_AUTOCONF="yes" 
IPV6ADDR_SECONDARIES="2001:db8:1000::200/64" 
  • 2001:db8:1000::100 is the primary IPv6, replace the example with an address in your IPv6 subnet.
  • 2001:db8:1000::200 is the optional secondary IPv6. Remove the IPV6ADDR_SECONDARIES line if a secondary address isn't required, or replace the example with an address in your IPv6 subnet.

Restart networking or reboot.

service network restart

IP forwarding

If you have IP forwarding enabled, such as when using your server as a VPN, add the following lines to /etc/sysctl.conf:

net.ipv6.conf.all.accept_ra=2
net.ipv6.conf.eth0.accept_ra=2

These variables default value is 1, which prevents IPv6 from working. To verify the status of IP forwarding, run:

# sysctl net.ipv4.ip_forward

More Information

Refer to specific network configuration examples on the instance's IPv6 information page.

Configuration Examples

Want to contribute?

You could earn up to $300 by adding new articles