Skip to main content

Disable IPv6 on Debian

Applies to: Medulla
Version: Debian 12
Environment: On-Premise
Category: Network / Deployment / IPv6

Background

In certain environments (notably OVH, VPS, NAT, incomplete DNS, or hybrid IPv4/IPv6 networks), IPv6 can cause connectivity or network resolution issues.

It may therefore be necessary to disable IPv6 on the Debian server to ensure stable operation of Medulla.


Temporarily disabling IPv6

This method disables IPv6 until the next server reboot.

1. Open an SSH terminal

ssh root@SERVER_IP

2. Disable IPv6

Run the following command:

sysctl -w net.ipv6.conf.all.disable_ipv6=1

3. Verify that IPv6 is disabled

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

Expected result:

1

If the returned value is 1, IPv6 is disabled.

Caution:
Depending on your network configuration, this operation may cause a temporary SSH disconnection.


Permanently disabling IPv6

To permanently disable IPv6, you must modify the sysctl configuration.

1. Edit the sysctl file

nano /etc/sysctl.conf

2. Add the following lines to the end of the file

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

3. Apply the configuration

sysctl -p

4. Verify that IPv6 is disabled

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

Expected result:

1

Network verification

To verify that IPv6 is no longer active:

ip a | grep inet6

No IPv6 addresses should appear (excluding the loopback interface, depending on the configuration).


Default values

Item Value
Temporary deactivation sysctl -w net.ipv6.conf.all.disable_ipv6=1
Permanent file /etc/sysctl.conf
Command to apply the configuration sysctl -p