Skip to main content

Disabling IPv6 on Debian

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

Background

In certain environments (such as 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.

Warning:
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

Element Value
Temporary Disabling sysctl -w net.ipv6.conf.all.disable_ipv6=1
Permanent file /etc/sysctl.conf
Application command sysctl -p