<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: laurencet</title>
    <description>The latest articles on DEV Community by laurencet (@laurencet).</description>
    <link>https://dev.to/laurencet</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4084525%2F3984677f-4e6a-4fb7-8a19-9c04ccb48657.jpg</url>
      <title>DEV Community: laurencet</title>
      <link>https://dev.to/laurencet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laurencet"/>
    <language>en</language>
    <item>
      <title>Setting up an IPv6 only VM</title>
      <dc:creator>laurencet</dc:creator>
      <pubDate>Thu, 20 Aug 2026 07:11:03 +0000</pubDate>
      <link>https://dev.to/laurencet/setting-up-an-ipv6-only-vm-2dcl</link>
      <guid>https://dev.to/laurencet/setting-up-an-ipv6-only-vm-2dcl</guid>
      <description>&lt;p&gt;Too many applications are still using IPv4 only, which is a shame as IPv6 was standardised ~28 years ago.&lt;br&gt;
If you want to check if your application is IPv6 ready, best thing is to have a server or docker/podman network which is IPv6 only. I'm showing how to set up both variants here. &lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up RedHat 10 for IPv6 only
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Note
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Root access is, of course, required for all these commands. The following examples use &lt;code&gt;eth0&lt;/code&gt; network interface. Use &lt;code&gt;nmcli con show&lt;/code&gt; to list down the network interfaces and adapt the commands accordingly.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;First step is enabling IPv6:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# enable ipv6
 sysctl -w net.ipv6.conf.all.disable_ipv6=0
 echo "net.ipv6.conf.all.disable_ipv6=0" | tee /etc/sysctl.d/99-ipv6-enable.conf
# sync to network manager
for DEVICE in $(nmcli con show | grep -v ^NAME | awk '{print $NF}') ; do
  nmcli connection reload $DEVICE
  nmcli dev reapply $DEVICE
done 
nmcli con mod eth0 ipv6.method auto
nmcli con down eth0 &amp;amp;&amp;amp; nmcli con up eth0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;nmcli&lt;/code&gt; command is required for all network interfaces, so if you also have &lt;code&gt;eth1&lt;/code&gt;, just copy and paste the last two lines for &lt;code&gt;eth1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now we need to disable IPv4. Note down the inet6-Address of your network interface. This command shows the IPv6 addresses and filters to globally or site-locally routable addresses only:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ip -6 addr show scope global
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now log out and log in via IPv6-Channel, e.g :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -6 root@&amp;lt;ipv6-address&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This is necessary, because when you now disable IPv4 you will loose connectivity to the VM if you are logged in via IPv4 connection.&lt;/p&gt;

&lt;p&gt;Disable IPv4:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nmcli connection modify eth0 ipv4.method disabled
nmcli con down eth0 &amp;amp;&amp;amp; nmcli con up eth0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Again execute the same commands for all other network interfaces. &lt;br&gt;
That's it. Now the VM should be using IPv6 for communication only. You can start testing your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up an IPv6 podman network
&lt;/h2&gt;

&lt;p&gt;If your application is available as docker image, you can instead create a docker/podman network with IPv6 only for testing. Therefore you can simply create an IPv6 podman network by specifying an IPv6 subnet when creating the network:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;podman network create --subnet fd00:dead:beef::/64 --gateway fd00:dead:beef::1 ipv6net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Containers started in this network will now get IP addresses starting at &lt;code&gt;fd00:dead:beef::2&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Note
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;In these examples, I am using the subnet &lt;code&gt;fd00:dead:beef::&lt;/code&gt;. This is a private IP address range, comparable to the &lt;code&gt;192.168.x.x&lt;/code&gt; ranges in IPv4. You can freely choose any &lt;code&gt;fd00::/8 prefix&lt;/code&gt; for your own use.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Use the command &lt;code&gt;podman network inspect &amp;lt;network&amp;gt;&lt;/code&gt; to verify the network that has been created:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;podman network inspect ipv6net
[
    {
      "name": "ipv6net",
      "id": "37862e16959562d864468dbe251f6a870901bad81981271b179eb8505a93a37c",
      "driver": "bridge",
      "network_interface": "podman1",
      "created": "2026-08-13T03:25:57.396115356-04:00",
      "subnets": [
           {
                "subnet": "fd00:dead:beef::/64",
                "gateway": "fd00:dead:beef::1"
           }
      ],
      "ipv6_enabled": true,
      "internal": false,
      "dns_enabled": true,
      "ipam_options": {
           "driver": "host-local"
      },
      "containers": {}
    }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Podman also knows the option &lt;code&gt;--ipv6&lt;/code&gt;, which is actually a dualstack option and will create a network with both IPv4 and IPv6 addresses.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;podman network create --ipv6 --subnet fd00:dead:beef::/64 --gateway fd00:dead:beef::1 dualstacknet
podman network inspect dualstacknet
[
    {
      "name": "dualstacknet",
      "id": "94269793c55dd03532287da92e7f73430c9da323f4a949a7bf70b64649158ca0",
      "driver": "bridge",
      "network_interface": "podman1",
      "created": "2026-06-26T03:21:49.382382629-04:00",
      "subnets": [
           {
                "subnet": "fd00:dead:beef::/64",
                "gateway": "fd00:dead:beef::1"
           },
           {
                "subnet": "10.89.0.0/24",
                "gateway": "10.89.0.1"
           }
      ],
      "ipv6_enabled": true,
      "internal": false,
      "dns_enabled": true,
      "ipam_options": {
           "driver": "host-local"
      },
      "containers": {}
    }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Podman's DNS plugin (aardvark-dns) listens on both IPv4 and IPv6 so Podman's built-in DNS should work in this network and container-to-container DNS by name should now be available.&lt;/p&gt;

&lt;p&gt;Now you can run containers in this network and start testing. Make sure to use the &lt;code&gt;--network&lt;/code&gt; parameter when starting containers, to ensure the network is used. Have fun!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>podman</category>
      <category>ipv6</category>
      <category>redhat</category>
    </item>
  </channel>
</rss>
