{"id":2275,"date":"2025-11-21T19:17:42","date_gmt":"2025-11-21T16:17:42","guid":{"rendered":"https:\/\/www.dchost.com\/blog\/ipv6-setup-and-configuration-guide-for-your-vps-server\/"},"modified":"2026-11-04T08:46:14","modified_gmt":"2026-11-04T05:46:14","slug":"linux-vps-static-ipv6","status":"publish","type":"post","link":"https:\/\/www.dchost.com\/blog\/en\/linux-vps-static-ipv6\/","title":{"rendered":"Static IPv6 Setup on a Linux VPS"},"content":{"rendered":"<div class=\"dchost-blog-content-wrapper\"><p>IPv6 adds a native connectivity option to your <a href=\"https:\/\/www.dchost.com\/vps\">VPS<\/a> for users on IPv6-capable networks. Dual-stack (IPv4 + IPv6) lets you offer that option while retaining IPv4 access. It does not automatically improve routing, performance, or email deliverability; those outcomes depend on your network paths and service configuration. In this guide we will walk through, step by step, how to configure static IPv6 on a Linux VPS using Netplan, ifupdown or NetworkManager, test that it really works end-to-end, secure it with a proper firewall, and wire it into your DNS and email stack while preserving existing IPv4 access.<\/p>\n<div id=\"toc_container\" role=\"navigation\" aria-label=\"Table of Contents\" data-nosnippet class=\"toc_transparent no_bullets toc_numbered toc_title_center\"><p class=\"toc_title\">\u0130\u00e7indekiler<\/p><ul class=\"toc_list\"><li><a href=\"#Why_Add_IPv6_to_Your_VPS\"><span class=\"toc_number toc_depth_1\">1.<\/span> Why Add IPv6 to Your VPS?<\/a><\/li><li><a href=\"#IPv6_Basics_for_VPS_Owners_What_You_Actually_Need_to_Know\"><span class=\"toc_number toc_depth_1\">2.<\/span> IPv6 Basics for VPS Owners: What You Actually Need to Know<\/a><ul><li><a href=\"#IPv6_address_format_and_compression\"><span class=\"toc_number toc_depth_2\">2.1.<\/span> IPv6 address format and compression<\/a><\/li><li><a href=\"#Prefixes_and_subnets\"><span class=\"toc_number toc_depth_2\">2.2.<\/span> Prefixes and subnets<\/a><\/li><li><a href=\"#Dual-stack_vs_IPv6-only\"><span class=\"toc_number toc_depth_2\">2.3.<\/span> Dual-stack vs IPv6-only<\/a><\/li><li><a href=\"#Link-local_and_global_addresses\"><span class=\"toc_number toc_depth_2\">2.4.<\/span> Link-local and global addresses<\/a><\/li><\/ul><\/li><li><a href=\"#Prerequisites_What_You_Need_Before_Configuring_IPv6\"><span class=\"toc_number toc_depth_1\">3.<\/span> Prerequisites: What You Need Before Configuring IPv6<\/a><ul><li><a href=\"#1_IPv6_support_in_your_VPS_plan\"><span class=\"toc_number toc_depth_2\">3.1.<\/span> 1. IPv6 support in your VPS plan<\/a><\/li><li><a href=\"#2_Operating_system_support\"><span class=\"toc_number toc_depth_2\">3.2.<\/span> 2. Operating system support<\/a><\/li><li><a href=\"#3_DNS_and_control_over_records\"><span class=\"toc_number toc_depth_2\">3.3.<\/span> 3. DNS and control over records<\/a><\/li><\/ul><\/li><li><a href=\"#Finding_Your_IPv6_Details_in_the_dchostcom_Panel\"><span class=\"toc_number toc_depth_1\">4.<\/span> Finding Your IPv6 Details in the dchost.com Panel<\/a><\/li><li><a href=\"#Configuring_IPv6_on_Popular_Linux_Distributions\"><span class=\"toc_number toc_depth_1\">5.<\/span> Configuring IPv6 on Popular Linux Distributions<\/a><ul><li><a href=\"#Ubuntu_or_Debian_systems_managed_by_Netplan\"><span class=\"toc_number toc_depth_2\">5.1.<\/span> Ubuntu or Debian systems managed by Netplan<\/a><\/li><li><a href=\"#Debian_with_ifupdown_etcnetworkinterfaces\"><span class=\"toc_number toc_depth_2\">5.2.<\/span> Debian with ifupdown (\/etc\/network\/interfaces)<\/a><\/li><li><a href=\"#RHEL_Rocky_Linux_and_AlmaLinux_with_NetworkManager\"><span class=\"toc_number toc_depth_2\">5.3.<\/span> RHEL, Rocky Linux and AlmaLinux with NetworkManager<\/a><ul><li><a href=\"#Using_nmcli\"><span class=\"toc_number toc_depth_3\">5.3.1.<\/span> Using nmcli<\/a><\/li><li><a href=\"#Legacy_ifcfg_files_where_supported\"><span class=\"toc_number toc_depth_3\">5.3.2.<\/span> Legacy ifcfg files where supported<\/a><\/li><\/ul><\/li><li><a href=\"#Check_basic_IPv6_connectivity\"><span class=\"toc_number toc_depth_2\">5.4.<\/span> Check basic IPv6 connectivity<\/a><\/li><\/ul><\/li><li><a href=\"#Testing_Troubleshooting_and_Common_IPv6_Pitfalls\"><span class=\"toc_number toc_depth_1\">6.<\/span> Testing, Troubleshooting, and Common IPv6 Pitfalls<\/a><ul><li><a href=\"#Verify_routing\"><span class=\"toc_number toc_depth_2\">6.1.<\/span> Verify routing<\/a><\/li><li><a href=\"#Validate_DNS_resolution_over_IPv6\"><span class=\"toc_number toc_depth_2\">6.2.<\/span> Validate DNS resolution over IPv6<\/a><\/li><li><a href=\"#Check_for_firewall_blocks\"><span class=\"toc_number toc_depth_2\">6.3.<\/span> Check for firewall blocks<\/a><\/li><li><a href=\"#Browser_and_external_tests\"><span class=\"toc_number toc_depth_2\">6.4.<\/span> Browser and external tests<\/a><\/li><\/ul><\/li><li><a href=\"#Securing_IPv6_Firewall_and_Hardening_Essentials\"><span class=\"toc_number toc_depth_1\">7.<\/span> Securing IPv6: Firewall and Hardening Essentials<\/a><ul><li><a href=\"#Apply_a_dual-stack_firewall_policy\"><span class=\"toc_number toc_depth_2\">7.1.<\/span> Apply a dual-stack firewall policy<\/a><\/li><li><a href=\"#General_VPS_security\"><span class=\"toc_number toc_depth_2\">7.2.<\/span> General VPS security<\/a><\/li><li><a href=\"#Application-level_configuration\"><span class=\"toc_number toc_depth_2\">7.3.<\/span> Application-level configuration<\/a><\/li><\/ul><\/li><li><a href=\"#IPv6_and_DNS_AAAA_Records_Reverse_DNS_and_Email\"><span class=\"toc_number toc_depth_1\">8.<\/span> IPv6 and DNS: AAAA Records, Reverse DNS, and Email<\/a><ul><li><a href=\"#Adding_AAAA_records\"><span class=\"toc_number toc_depth_2\">8.1.<\/span> Adding AAAA records<\/a><\/li><li><a href=\"#Reverse_DNS_PTR_for_IPv6\"><span class=\"toc_number toc_depth_2\">8.2.<\/span> Reverse DNS (PTR) for IPv6<\/a><\/li><li><a href=\"#Email_deliverability_over_IPv6\"><span class=\"toc_number toc_depth_2\">8.3.<\/span> Email deliverability over IPv6<\/a><\/li><\/ul><\/li><li><a href=\"#Monitoring_IPv6_on_Your_VPS_in_Production\"><span class=\"toc_number toc_depth_1\">9.<\/span> Monitoring IPv6 on Your VPS in Production<\/a><ul><li><a href=\"#Dual-stack_uptime_checks\"><span class=\"toc_number toc_depth_2\">9.1.<\/span> Dual-stack uptime checks<\/a><\/li><li><a href=\"#Log_analysis_and_observability\"><span class=\"toc_number toc_depth_2\">9.2.<\/span> Log analysis and observability<\/a><\/li><\/ul><\/li><li><a href=\"#When_to_Consider_IPv6-Only_on_a_VPS\"><span class=\"toc_number toc_depth_1\">10.<\/span> When to Consider IPv6-Only on a VPS<\/a><ul><li><a href=\"#Pros_of_IPv6-only\"><span class=\"toc_number toc_depth_2\">10.1.<\/span> Pros of IPv6-only<\/a><\/li><li><a href=\"#Challenges_and_mitigation\"><span class=\"toc_number toc_depth_2\">10.2.<\/span> Challenges and mitigation<\/a><\/li><\/ul><\/li><li><a href=\"#Summary_and_Next_Steps_with_dchostcom\"><span class=\"toc_number toc_depth_1\">11.<\/span> Summary and Next Steps with dchost.com<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Why_Add_IPv6_to_Your_VPS\">Why Add IPv6 to Your VPS?<\/span><\/h2>\n<p>Before we dive into configs, it is important to understand why you are investing time in IPv6 at all. The short version: IPv4 addresses are scarce and expensive, while IPv6 provides a vastly larger address space. Routing quality and performance depend on the networks involved, not just the IP version.<\/p>\n<p>If you have been following our articles on <a href=\"https:\/\/www.dchost.com\/blog\/en\/ipv4-cost-planning-hosting-infrastructure\/\">the period of record IPv4 address prices<\/a> and <a href=\"https:\/\/www.dchost.com\/blog\/en\/global-ipv6-adoption-surpasses-40-what-it-really-means-for-your-infrastructure\/\">global IPv6 adoption<\/a>, consider your own audience and network paths. IPv6 adoption varies by country and access network, and many modern CDNs and managed DNS services support IPv6.<\/p>\n<p>For your VPS, enabling IPv6 means:<\/p>\n<ul>\n<li><strong>Better reachability<\/strong> to users on IPv6-only or IPv6-preferred networks.<\/li>\n<li><strong>Long-term flexibility<\/strong> as IPv4 pricing and availability change, though dual-stack still requires IPv4 addresses.<\/li>\n<li><strong>More addressing flexibility<\/strong> for microservices or multi-region architectures, subject to your provider&#8217;s allocation and routing.<\/li>\n<li><strong>IPv6 email transport<\/strong> to compatible mail servers; enabling it alone does not improve deliverability.<\/li>\n<\/ul>\n<p>The configuration examples below assume that your provider has confirmed IPv6 availability for your VPS, assigned usable address and routing details, and provided console access. Confirm those details for your dchost.com plan and location before making changes.<\/p>\n<h2><span id=\"IPv6_Basics_for_VPS_Owners_What_You_Actually_Need_to_Know\">IPv6 Basics for VPS Owners: What You Actually Need to Know<\/span><\/h2>\n<p>You do not need to become a network engineer to use IPv6 on your VPS, but a few key concepts will make the configuration steps much easier to understand.<\/p>\n<h3><span id=\"IPv6_address_format_and_compression\">IPv6 address format and compression<\/span><\/h3>\n<p>An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits, separated by colons. Example:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">2001:db8:1234:abcd:0000:0000:0000:0001<\/code><\/pre>\n<p>Zeros can be compressed for readability:<\/p>\n<ul>\n<li>Leading zeros in each group can be omitted: <code>0001<\/code> \u2192 <code>1<\/code>.<\/li>\n<li>One continuous run of <code>:0000:<\/code> groups can become <code>::<\/code>.<\/li>\n<\/ul>\n<p>So the address above becomes:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">2001:db8:1234:abcd::1<\/code><\/pre>\n<h3><span id=\"Prefixes_and_subnets\">Prefixes and subnets<\/span><\/h3>\n<p>IPv6 uses CIDR notation to express networks. A <code>\/64<\/code> is one example; use the interface prefix specified by your provider rather than assuming every VPS receives the same allocation.<\/p>\n<ul>\n<li><code>2001:db8:1234:abcd::\/64<\/code> has a 64-bit network prefix and is part of the documentation-only <code>2001:db8::\/32<\/code> range. These examples cannot be used for public connectivity.<\/li>\n<li>Your provider may assign individual addresses or a routed block. Use only your assigned addresses and the routing model supplied for your VPS.<\/li>\n<\/ul>\n<h3><span id=\"Dual-stack_vs_IPv6-only\">Dual-stack vs IPv6-only<\/span><\/h3>\n<p>With <strong>dual-stack<\/strong>, your VPS has both IPv4 and IPv6 connectivity, and the intended services listen on both families. This preserves access for IPv4-only clients while adding IPv6; it requires testing both paths rather than assuming one successful test covers both.<\/p>\n<p>IPv6-only setups are possible. NAT64\/DNS64 can help IPv6-only clients reach IPv4 services, but does not by itself let IPv4-only visitors reach an IPv6-only website; that needs an IPv4-capable frontend such as a reverse proxy. We covered this in detail in our article on <a href=\"https:\/\/www.dchost.com\/blog\/en\/ipv6-only-vps-nat64-dns64-ipv4-access\/\">running a website on an IPv6-only VPS<\/a>. For now, assume you are targeting dual-stack.<\/p>\n<h3><span id=\"Link-local_and_global_addresses\">Link-local and global addresses<\/span><\/h3>\n<p>Your server will often have:<\/p>\n<ul>\n<li><strong>Link-local<\/strong> address (reserved prefix <code>fe80::\/10<\/code>; commonly shown starting with <code>fe80::<\/code>) \u2013 used for communication on the local link only, not routed on the internet.<\/li>\n<li><strong>Global unicast<\/strong> address \u2013 your provider-assigned public address, subject to its routing. The abbreviated <code>2a01:4f8:...<\/code> is not a complete address; use your actual allocation for DNS.<\/li>\n<\/ul>\n<p>Use the global address confirmed for your VPS. If the dchost.com panel does not show all required details, obtain them from support before continuing.<\/p>\n<h2><span id=\"Prerequisites_What_You_Need_Before_Configuring_IPv6\">Prerequisites: What You Need Before Configuring IPv6<\/span><\/h2>\n<p>Before touching configuration files, verify these prerequisites. Missing provider support, address details, or firewall rules can prevent IPv6 connectivity.<\/p>\n<h3><span id=\"1_IPv6_support_in_your_VPS_plan\">1. IPv6 support in your VPS plan<\/span><\/h3>\n<p>IPv6 availability depends on the provider, location, and plan. For your dchost.com VPS, confirm the following:<\/p>\n<ul>\n<li>IPv6 is enabled at the data center network level.<\/li>\n<li>Your VPS has at least one IPv6 address and gateway assigned.<\/li>\n<li>Security groups\/firewall templates have IPv6 rules configured.<\/li>\n<\/ul>\n<p>If you are not sure, open a ticket with our support team and ask for the IPv6 details for your VPS.<\/p>\n<h3><span id=\"2_Operating_system_support\">2. Operating system support<\/span><\/h3>\n<p>Recent mainstream Linux distributions generally support IPv6 in their standard kernels (Ubuntu, Debian, Rocky Linux, AlmaLinux, etc.). Image settings can still disable it. Potential problems include:<\/p>\n<ul>\n<li>IPv6 disabled on the intended interface via <code>sysctl<\/code> or at boot with <code>ipv6.disable=1<\/code>. Check the interface-specific <code>net.ipv6.conf.ens3.disable_ipv6<\/code> value; reading <code>all.disable_ipv6<\/code> alone does not establish interface state. The boot-time disable parameter requires correction and a planned reboot.<\/li>\n<li>Multiple network configuration tools trying to manage the same interface (e.g., ifupdown and Netplan).<\/li>\n<li>Firewall rules that allow IPv4 but drop all IPv6 traffic.<\/li>\n<\/ul>\n<h3><span id=\"3_DNS_and_control_over_records\">3. DNS and control over records<\/span><\/h3>\n<p>You will need the ability to edit your domain&#8217;s DNS records to add <strong>AAAA records<\/strong>. IPv6 PTR records belong to a separate reverse-DNS zone, normally controlled by the IP provider; request them through the provider unless reverse DNS has been delegated to you. If you are not fully comfortable with DNS yet, our article <a href=\"https:\/\/www.dchost.com\/blog\/en\/common-dns-record-mistakes\/\">explaining DNS records like a friend<\/a> is a great warm-up.<\/p>\n<h2><span id=\"Finding_Your_IPv6_Details_in_the_dchostcom_Panel\">Finding Your IPv6 Details in the dchost.com Panel<\/span><\/h2>\n<p>Check your dchost.com control panel for the following IPv6 details. If any are missing, request them from support before configuring a static address:<\/p>\n<ul>\n<li><strong>Global IPv6 address<\/strong> for the VPS (e.g. <code>2001:db8:1234:abcd::10<\/code>).<\/li>\n<li><strong>Prefix length<\/strong> (for example <code>\/64<\/code>; use the assigned value).<\/li>\n<li><strong>Gateway address<\/strong> (e.g. <code>2001:db8:1234:abcd::1<\/code>).<\/li>\n<li><strong>IPv6 DNS resolvers<\/strong> (provider-supplied, if available, or public resolvers).<\/li>\n<\/ul>\n<p>We will plug these details into your network configuration files in the next section.<\/p>\n<h2><span id=\"Configuring_IPv6_on_Popular_Linux_Distributions\">Configuring IPv6 on Popular Linux Distributions<\/span><\/h2>\n<p>The exact configuration depends on your distro and networking stack. Below you will find common approaches for Ubuntu\/Debian and Rocky\/AlmaLinux (RHEL clones). Adjust interface names (<code>eth0<\/code>, <code>ens3<\/code>, <code>enp1s0<\/code>, etc.) to match your VPS. The 2001:db8::\/32 addresses below are documentation placeholders, not usable public addresses. Use only addresses and prefixes assigned to you. These static examples assume one uplink with an on-link gateway and manually configured IPv6 address and default route. A gateway such as <code>fe80::1<\/code> is link-local and must be associated with the correct interface. Follow your provider&#8217;s instructions if it uses SLAAC, DHCPv6, \/128 addresses or a different routing setup.<\/p>\n<p>Use only the method that manages your interface. Back up the existing configuration and confirm console or rescue access before applying changes: a network restart or incorrect configuration can disconnect SSH. Merge the IPv6 settings into your working configuration rather than replacing it, preserving existing IPv4 addresses, routes, and DNS settings.<\/p>\n<h3><span id=\"Ubuntu_or_Debian_systems_managed_by_Netplan\">Ubuntu or Debian systems managed by Netplan<\/span><\/h3>\n<p>Use this method only if Netplan manages the interface. Check the existing renderer (systemd-networkd or NetworkManager) and all files under <code>\/etc\/netplan\/<\/code>; do not create a second conflicting definition for the same interface. The example below uses networkd, IPv4 DHCP and fully static IPv6.<\/p>\n<ol>\n<li>Find your Netplan config file, e.g.:\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">ls \/etc\/netplan\/<\/code><\/pre>\n<\/li>\n<li>Edit the YAML file, for example <code>\/etc\/netplan\/50-cloud-init.yaml<\/code>. If it is marked as generated, follow the image&#8217;s instructions for making persistent changes:<\/li>\n<\/ol>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">network:\n  version: 2\n  renderer: networkd\n  ethernets:\n    ens3:\n      dhcp4: true\n      dhcp6: false\n      accept-ra: false\n      addresses:\n        - 2001:db8:1234:abcd::10\/64\n      routes:\n        - to: &quot;::\/0&quot;\n          via: 2001:db8:1234:abcd::1\n      nameservers:\n        addresses:\n          - 2001:4860:4860::8888\n          - 2001:4860:4860::8844\n<\/code><\/pre>\n<p>Replace the IPv6 address, prefix and gateway with the ones from your dchost.com panel. Keep <code>dhcp4: true<\/code> only if your existing IPv4 setup uses DHCP; otherwise preserve your current static IPv4 configuration instead of adopting the example&#8217;s DHCP setting. Preserve your existing renderer, routes and DNS list as well; the public resolvers shown are examples. <code>dhcp6: false<\/code> disables DHCPv6, while <code>accept-ra: false<\/code> separately disables Router Advertisement acceptance. Use these settings only for the fully static setup described above. The <code>routes<\/code> entry replaces the deprecated <code>gateway6<\/code> key; an AAAA lookup does not itself require an IPv6 DNS transport.<\/p>\n<ol start=\"3\">\n<li>Generate the configuration to check for errors, then start a timed trial with console access available:<\/li>\n<\/ol>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">sudo netplan generate\nsudo netplan try --timeout 120\n<\/code><\/pre>\n<p><code>netplan try<\/code> applies the configuration and waits for confirmation. Check IPv4 and IPv6 from a second connection before confirming; without confirmation, it attempts to revert after the timeout. Netplan documents rollback bugs, so verify both connectivity and the files on disk from the console if it times out or is cancelled. <code>sudo netplan apply<\/code> has no timed confirmation. Inspect the address and route below, then repeat the checks after a planned reboot to confirm persistence:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">ip -6 addr show dev ens3\nip -6 route<\/code><\/pre>\n<h3><span id=\"Debian_with_ifupdown_etcnetworkinterfaces\">Debian with ifupdown (\/etc\/network\/interfaces)<\/span><\/h3>\n<p>Use <code>\/etc\/network\/interfaces<\/code> and its included files only when <code>ifupdown<\/code> manages this interface. Merge the IPv6 stanza into the working configuration, preserving loopback, IPv4 and DNS definitions. The sample assumes IPv4 DHCP and fully static IPv6; do not replace a static IPv4 configuration with it.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">auto ens3\niface ens3 inet dhcp\n\niface ens3 inet6 static\n    address 2001:db8:1234:abcd::10\/64\n    gateway 2001:db8:1234:abcd::1\n    accept_ra 0\n<\/code><\/pre>\n<p>Here <code>accept_ra 0<\/code> matches the manually supplied gateway; do not use it unchanged on a network that learns its route from Router Advertisements. With the configuration backed up and console access available, restart the ifupdown networking service to apply it. This can interrupt SSH:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">sudo systemctl restart networking<\/code><\/pre>\n<h3><span id=\"RHEL_Rocky_Linux_and_AlmaLinux_with_NetworkManager\">RHEL, Rocky Linux and AlmaLinux with NetworkManager<\/span><\/h3>\n<p>On RHEL-like systems using NetworkManager, use <code>nmcli<\/code>. Editing an <code>ifcfg<\/code> file is an alternative only where that format is supported by the installed version and already used for the connection.<\/p>\n<h4><span id=\"Using_nmcli\">Using nmcli<\/span><\/h4>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">nmcli connection show<\/code><\/pre>\n<p>Find the connection profile for your uplink; <code>System eth0<\/code> is only an example name and need not match the device name. Substitute the actual profile name, or use its UUID if names are duplicated. Replace the documentation address, prefix and gateway with your allocation. These commands change IPv6 properties only; merge with any existing IPv6 address\/route settings and preserve required DNS servers. Check that <code>ipv6.never-default<\/code> is not enabled and that another default route does not conflict. Have console access available before reactivation, which may disconnect SSH.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">sudo nmcli connection modify &quot;System eth0&quot; \\\n  ipv6.method manual \\\n  ipv6.addresses 2001:db8:1234:abcd::10\/64 \\\n  ipv6.gateway 2001:db8:1234:abcd::1\n\nsudo nmcli connection up &quot;System eth0&quot;\n<\/code><\/pre>\n<h4><span id=\"Legacy_ifcfg_files_where_supported\">Legacy ifcfg files where supported<\/span><\/h4>\n<p>RHEL 9 can still read pre-existing <code>ifcfg<\/code> profiles; RHEL 10 removed this format. Check the installed release and <code>ifcfg-rh<\/code> plugin support on derivatives as well. Use this alternative only if NetworkManager already manages your connection through an existing file such as <code>\/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/code>. Back it up and merge the IPv6 settings; retain the real <code>DEVICE<\/code>, <code>BOOTPROTO<\/code>, <code>ONBOOT<\/code>, IPv4 and connection identity values. The snippet assumes IPv4 DHCP and static IPv6.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">DEVICE=eth0\nBOOTPROTO=dhcp\nONBOOT=yes\n\nIPV6INIT=yes\nIPV6_AUTOCONF=no\nDHCPV6C=no\nIPV6ADDR=2001:db8:1234:abcd::10\/64\nIPV6_DEFAULTGW=2001:db8:1234:abcd::1\n<\/code><\/pre>\n<p>If you used the legacy file method, load the edited file into NetworkManager, then reactivate the correct profile. Loading alone does not apply the new settings to the active connection. Substitute your actual filename and profile name; reactivation can interrupt SSH, so use the prepared console access:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">sudo nmcli connection load \/etc\/sysconfig\/network-scripts\/ifcfg-eth0\nsudo nmcli connection up &quot;System eth0&quot;\n<\/code><\/pre>\n<h3><span id=\"Check_basic_IPv6_connectivity\">Check basic IPv6 connectivity<\/span><\/h3>\n<p>Regardless of distribution, once configured you should verify that you can reach the internet over IPv6:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">ping -6 -c 4 google.com\nping6 -c 4 ipv6.google.com\ncurl -6 https:\/\/ifconfig.co\n<\/code><\/pre>\n<p>Successful pings and an IPv6 address returned by curl confirm outbound IPv6 connectivity to those destinations. They do not verify inbound access to your VPS services. If <code>ping6<\/code> is unavailable, use <code>ping -6<\/code>. Missing echo replies alone do not prove a routing failure, since a destination may filter them.<\/p>\n<h2><span id=\"Testing_Troubleshooting_and_Common_IPv6_Pitfalls\">Testing, Troubleshooting, and Common IPv6 Pitfalls<\/span><\/h2>\n<p>Getting an IPv6 address on the interface is only half the story. Check that the assigned global address is not marked <code>tentative<\/code> or <code>dadfailed<\/code>; these indicate pending or failed Duplicate Address Detection. You also need to confirm routing, DNS, and firewall behaviour.<\/p>\n<h3><span id=\"Verify_routing\">Verify routing<\/span><\/h3>\n<p>Check the default IPv6 route:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">ip -6 route show default<\/code><\/pre>\n<p>You should see a line similar to:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">default via 2001:db8:1234:abcd::1 dev ens3 proto static<\/code><\/pre>\n<p>Without a default route, destinations not covered by a more specific route are unreachable. Re-check your gateway configuration.<\/p>\n<h3><span id=\"Validate_DNS_resolution_over_IPv6\">Validate DNS resolution over IPv6<\/span><\/h3>\n<p>Test a DNS query to Google Public DNS over IPv6. This explicitly selects that resolver rather than testing your system\u2019s configured resolver:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">dig aaaa www.dchost.com @2001:4860:4860::8888<\/code><\/pre>\n<p>A DNS response confirms communication with the selected resolver, but check the answer section to see whether an AAAA record was returned. If this query succeeds but normal hostname lookups fail, inspect <code>\/etc\/resolv.conf<\/code> and the system\u2019s resolver configuration. If the file is generated, fix the owning network\/resolver service rather than editing it blindly. Querying an AAAA record can use either IPv4 or IPv6 transport; a DNS answer does not prove reachability of the returned address.<\/p>\n<h3><span id=\"Check_for_firewall_blocks\">Check for firewall blocks<\/span><\/h3>\n<p>IPv4 firewall rules may be correct while IPv6 traffic is blocked. Inspect IPv6 rules, counters and logs, including any provider firewall. If a temporary test rule is needed, restrict it to the test source and required service, then remove it after testing rather than accepting all IPv6 traffic.<\/p>\n<p>If you are using <code>nftables<\/code>, our detailed guide on <a href=\"https:\/\/www.dchost.com\/blog\/en\/the-nftables-firewall-cookbook-for-vps-rate-limiting-port-knocking-and-ipv6-rules-without-the-drama\/\">IPv6-aware nftables firewall configuration<\/a> walks through example rule sets to adapt to your services.<\/p>\n<h3><span id=\"Browser_and_external_tests\">Browser and external tests<\/span><\/h3>\n<p>Before publishing an AAAA record, test from an external IPv6-enabled workstation or VPS. Use your actual hostname and allocated address with a direct probe that preserves the hostname for TLS and SNI:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">curl -6 --noproxy &#039;*&#039; --resolve &#039;example.com:443:[2001:db8:1234:abcd::10]&#039; https:\/\/example.com\/\n<\/code><\/pre>\n<p>A literal-IP HTTPS URL can fail certificate or virtual-host checks even when routing works. Keep certificate verification enabled. If a CDN is involved, test its public client path separately from this direct-origin test. After DNS publication, continue with:<\/p>\n<ul>\n<li>Visiting online test sites that confirm if your domain and IP are reachable over IPv6.<\/li>\n<li>Using <code>curl -6 https:\/\/yourdomain.com<\/code> from another IPv6-enabled VPS or workstation.<\/li>\n<li>Running <code>traceroute6 yourdomain.com<\/code> to inspect responding hops; missing replies are not conclusive. Compare <code>curl -4<\/code> and <code>curl -6<\/code> without disabling either family on the server.<\/li>\n<\/ul>\n<h2><span id=\"Securing_IPv6_Firewall_and_Hardening_Essentials\">Securing IPv6: Firewall and Hardening Essentials<\/span><\/h2>\n<p>IPv6 does not magically make things more or less secure than IPv4; the same principles apply. What trips people up is <strong>forgetting<\/strong> to apply their security model to IPv6 at all.<\/p>\n<h3><span id=\"Apply_a_dual-stack_firewall_policy\">Apply a dual-stack firewall policy<\/span><\/h3>\n<p>Apply equivalent access restrictions to services you intend to expose over both IPv4 and IPv6, including any source-address restrictions for SSH or custom app ports. Deny unwanted traffic while allowing necessary control traffic such as ICMPv6. For example, <code>nftables<\/code> supports an <code>inet<\/code> table for both families. The input-chain example below assumes a simple VPS with one uplink, no routing\/container network, and no separate output restriction. Adapt interface names, SSH port and source restrictions to your policy; do not replace a running ruleset blindly. The IPv4 DHCP rule supports the earlier DHCP examples; omit it for static IPv4. Uncomment the DHCPv6 rule only if your connection requires that client traffic.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">table inet filter {\n  chain input {\n    type filter hook input priority 0;\n\n    ct state established,related accept\n    iifname &quot;lo&quot; accept\n    iifname &quot;ens3&quot; meta nfproto ipv4 udp sport 67 udp dport 68 accept\n    # Enable only when using DHCPv6:\n    # iifname &quot;ens3&quot; meta nfproto ipv6 udp sport 547 udp dport 546 accept\n\n    tcp dport { 22, 80, 443 } accept\n    icmp type echo-request accept\n    meta l4proto ipv6-icmp accept\n\n    reject with icmpx type admin-prohibited\n  }\n}\n<\/code><\/pre>\n<p><code>meta l4proto ipv6-icmp<\/code> matches ICMPv6 beyond extension headers; <code>ip6 nexthdr<\/code> only checks the immediately following header. This simple baseline accepts all ICMPv6, not just ping. Blocking it entirely can break neighbour discovery and Path MTU Discovery, including Packet Too Big messages. For a narrower policy, follow the message-type and scope guidance in RFC 4890. Other tables and chains can still drop traffic; check the merged configuration, apply it with console recovery available, and verify external access.<\/p>\n<h3><span id=\"General_VPS_security\">General VPS security<\/span><\/h3>\n<p>Enabling IPv6 should be part of a broader hardening plan. If you have not already, follow our checklist in <a href=\"https:\/\/www.dchost.com\/blog\/en\/vps-security-ssh-firewalls-recovery\/\">how to secure a VPS server<\/a> to lock down SSH, users, and services. The same hardening principles apply, but verify that address-based rules and network controls also cover IPv6.<\/p>\n<h3><span id=\"Application-level_configuration\">Application-level configuration<\/span><\/h3>\n<p>Enabling IPv6 on the interface does not ensure that applications listen on it. Review your service configurations:<\/p>\n<ul>\n<li><strong>Nginx:<\/strong> add <code>listen [::]:80;<\/code> to the existing HTTP server block while retaining its IPv4 listener. For HTTPS use <code>listen [::]:443 ssl;<\/code> in the existing TLS block, alongside its certificate and private-key configuration. A bare <code>listen [::]:443;<\/code> does not enable TLS. Check the merged configuration with <code>sudo nginx -t<\/code> before reloading.<\/li>\n<li><strong>Apache:<\/strong> <code>Listen<\/code> opens sockets and <code>&lt;VirtualHost *:80&gt;<\/code> selects the site. A single <code>Listen 80<\/code> can serve both families with an IPv6-capable build; confirm actual sockets and external IPv4\/IPv6 access. Do not blindly add <code>Listen [::]:80<\/code> beside it, since overlapping listeners can prevent startup. HTTPS also needs an SSL-enabled virtual host, certificate and key. Use the package\u2019s configuration test and virtual-host listing before applying changes.<\/li>\n<li><strong>Mail servers:<\/strong> configure Postfix\/Exim\/Dovecot listeners for the protocols and address families you actually intend to expose. Outbound mail uses separate routing and sender-policy checks.<\/li>\n<li><strong>Databases:<\/strong> enable IPv6 listeners only if needed and restrict access to authorized clients; an internal database does not need a public listener.<\/li>\n<\/ul>\n<h2><span id=\"IPv6_and_DNS_AAAA_Records_Reverse_DNS_and_Email\">IPv6 and DNS: AAAA Records, Reverse DNS, and Email<\/span><\/h2>\n<p>Once your VPS services are reachable over IPv6, publish the appropriate DNS records so clients can discover their IPv6 addresses by hostname. Preserve working A records, verify the returned answers and repeat external HTTPS tests. If you change or remove an AAAA record during rollback, caches may retain the old answer until its previous TTL expires.<\/p>\n<h3><span id=\"Adding_AAAA_records\">Adding AAAA records<\/span><\/h3>\n<p>For each hostname you want reachable over IPv6 (e.g. <code>example.com<\/code>, <code>www.example.com<\/code>):<\/p>\n<ul>\n<li>Create an <strong>AAAA record<\/strong> pointing to your server\u2019s IPv6 address.<\/li>\n<li>Keep your existing A record so IPv4 users can still connect.<\/li>\n<\/ul>\n<p>We have a dedicated deep dive on this topic in <a href=\"https:\/\/www.dchost.com\/blog\/en\/ready-for-ipv6-my-no-drama-dual-stack-playbook-for-aaaa-records-and-real-world-tests\/\">our no-drama dual-stack AAAA record playbook<\/a>, including real-world testing strategies.<\/p>\n<h3><span id=\"Reverse_DNS_PTR_for_IPv6\">Reverse DNS (PTR) for IPv6<\/span><\/h3>\n<p>IPv6 reverse DNS uses the <code>ip6.arpa<\/code> domain. The IP provider normally controls that zone; use its PTR workflow or ask support unless reverse DNS has been delegated to you. Domain DNS access by itself does not grant control of the provider\u2019s reverse zone.<\/p>\n<ul>\n<li>Choose the IPv6 address assigned to your VPS.<\/li>\n<li>Set the PTR \/ reverse hostname (e.g. <code>vps1.example.com<\/code>).<\/li>\n<\/ul>\n<p>This is particularly important for email servers.<\/p>\n<h3><span id=\"Email_deliverability_over_IPv6\">Email deliverability over IPv6<\/span><\/h3>\n<p>If you run your own mail server, check the receiving providers\u2019 IPv6 requirements before enabling outbound IPv6 mail. At a minimum:<\/p>\n<ul>\n<li>Arrange a PTR record for the sending IPv6 address. The PTR hostname should have an AAAA record pointing back to that address (forward-confirmed reverse DNS). Use a valid, resolvable HELO\/EHLO hostname; using the same name is a sensible consistency choice, but exact PTR\/HELO equality is not a universal SMTP requirement.<\/li>\n<li>Authorize the sending address or infrastructure in SPF, for example through an <code>ip6:<\/code> mechanism. DKIM signs messages and DMARC checks aligned authentication and policy; their records do not list sending IP addresses.<\/li>\n<li>An MX target needs AAAA when you intend to receive mail at that host over IPv6; merely sending outbound over IPv6 does not require adding AAAA to MX targets.<\/li>\n<li>Check receiving-provider rules, port 25 reachability and address reputation. Monitor blocklists, but do not assume IPv6 itself improves deliverability or fixes a listing.<\/li>\n<\/ul>\n<p>We have a separate, practical guide on this: <a href=\"https:\/\/www.dchost.com\/blog\/en\/email-deliverability-over-ipv6-ptr-helo-spf-and-blocklists-a-no-drama-playbook\/\">Email deliverability over IPv6: PTR, HELO, SPF and blocklists<\/a>. If you plan to send any serious volume of mail, read that before flipping the switch.<\/p>\n<h2><span id=\"Monitoring_IPv6_on_Your_VPS_in_Production\">Monitoring IPv6 on Your VPS in Production<\/span><\/h2>\n<p>Once IPv6 is live, you want your monitoring to treat it as a first-class citizen. Monitoring only IPv4 can miss an IPv6 outage, and the reverse is also true.<\/p>\n<h3><span id=\"Dual-stack_uptime_checks\">Dual-stack uptime checks<\/span><\/h3>\n<p>For each critical endpoint, configure:<\/p>\n<ul>\n<li>At least one probe that resolves an A record and connects over IPv4.<\/li>\n<li>At least one probe that resolves an AAAA record and connects over IPv6 without falling back to IPv4.<\/li>\n<\/ul>\n<p>This can be done with self-hosted tools or external monitoring services. Our article on <a href=\"https:\/\/www.dchost.com\/blog\/en\/vps-monitoring-prometheus-grafana-uptime-kuma\/\">VPS monitoring and alerts with Prometheus, Grafana and Uptime Kuma<\/a> is a good starting point if you want to run this stack yourself on a dchost.com VPS.<\/p>\n<h3><span id=\"Log_analysis_and_observability\">Log analysis and observability<\/span><\/h3>\n<p>Ensure your logging stack correctly parses IPv6 addresses:<\/p>\n<ul>\n<li>Web server logs should show IPv6 client IPs without truncation.<\/li>\n<li>WAF and intrusion detection rules should be IPv6-aware.<\/li>\n<li>Any IP-based rate limiting or abuse detection should support both families.<\/li>\n<\/ul>\n<p>Audit IP-based rate limits and access controls for IPv6 parsing and address\/prefix handling. Test the expected policy on both families; merely accepting a longer address string does not prove equivalent enforcement.<\/p>\n<h2><span id=\"When_to_Consider_IPv6-Only_on_a_VPS\">When to Consider IPv6-Only on a VPS<\/span><\/h2>\n<p>IPv6-only deployments can avoid an IPv4 allocation on some workloads, but translation, proxy services and application compatibility affect total cost. Plan both incoming users and outgoing dependencies before choosing this model. Panel-specific requirements also apply; cPanel &amp; WHM requires at least one IPv4 address.<\/p>\n<h3><span id=\"Pros_of_IPv6-only\">Pros of IPv6-only<\/span><\/h3>\n<ul>\n<li>Internal services may avoid individual IPv4 allocations when all required clients support IPv6.<\/li>\n<li>A large address space provides allocation flexibility, subject to the provider\u2019s routing and prefix assignment.<\/li>\n<li>An environment you control can be used to validate application and monitoring support before a wider rollout.<\/li>\n<\/ul>\n<h3><span id=\"Challenges_and_mitigation\">Challenges and mitigation<\/span><\/h3>\n<p>One challenge is talking to IPv4-only services (legacy APIs, payment gateways, some email providers). NAT64\/DNS64 can bridge IPv6-only clients to IPv4 destinations, though applications that depend on IPv4 literals or IPv4-only sockets may need additional compatibility mechanisms. Public IPv6-only services also need an IPv4-capable frontend if they must serve IPv4-only clients; the outbound bridge does not by itself provide that inbound access. In our detailed story on <a href=\"https:\/\/www.dchost.com\/blog\/en\/ipv6-only-vps-nat64-dns64-ipv4-access\/\">IPv6-only VPS with NAT64\/DNS64<\/a>, we discuss the translation model and its deployment considerations. Confirm that any required NAT64\/DNS64 or IPv4 frontend service is available from your chosen provider.<\/p>\n<p>Choose the model according to your reachability requirements:<\/p>\n<ul>\n<li>Start with dual-stack for internet-facing services.<\/li>\n<li>Use IPv6-only for internal microservices or lab environments where you control both ends.<\/li>\n<li>Plan IPv6-only public deployments only after you are comfortable with the operational model.<\/li>\n<\/ul>\n<h2><span id=\"Summary_and_Next_Steps_with_dchostcom\">Summary and Next Steps with dchost.com<\/span><\/h2>\n<p>A complete IPv6 deployment combines confirmed provider details, persistent settings in the active network manager, correct routing, appropriate firewall rules and services listening on IPv6. Verify external IPv4 and IPv6 access before publishing AAAA records, then check DNS answers, TLS and application behaviour again. Repeat address, route and service checks after a planned reboot. PTR and mail authentication need separate attention when sending email.<\/p>\n<p>When choosing a VPS, <a href=\"https:\/\/www.dchost.com\/dedicated-server\">dedicated server<\/a> or colocation arrangement with dchost.com, confirm IPv6 support for the location and plan, allocation and gateway details, and console access. Adapt these examples to that information and your operating system\u2019s active network manager.<\/p>\n<p>If you want to go deeper, we recommend reading our dual-stack DNS guide on <a href=\"https:\/\/www.dchost.com\/blog\/en\/ready-for-ipv6-my-no-drama-dual-stack-playbook-for-aaaa-records-and-real-world-tests\/\">AAAAs and real-world tests<\/a>, our <a href=\"https:\/\/www.dchost.com\/blog\/en\/email-deliverability-over-ipv6-ptr-helo-spf-and-blocklists-a-no-drama-playbook\/\">IPv6 email deliverability playbook<\/a>, and the <a href=\"https:\/\/www.dchost.com\/blog\/en\/the-nftables-firewall-cookbook-for-vps-rate-limiting-port-knocking-and-ipv6-rules-without-the-drama\/\">nftables firewall cookbook<\/a> for IPv6-aware security. Keep configuration backups and a rollback plan, and monitor IPv4 and IPv6 separately so fallback cannot hide a broken IPv6 path.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Configure IPv6 on your VPS with the active network manager, preserve IPv4 access, and verify routing, firewall rules, web listeners and DNS in order.<\/p>\n","protected":false},"author":1,"featured_media":10603,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[184],"tags":[],"class_list":["post-2275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/2275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/comments?post=2275"}],"version-history":[{"count":5,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/2275\/revisions"}],"predecessor-version":[{"id":10605,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/2275\/revisions\/10605"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media\/10603"}],"wp:attachment":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media?parent=2275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/categories?post=2275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/tags?post=2275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}