1️⃣ Create a dedicated sysctl file
sudo nano /etc/sysctl.d/99-disable-ipv6.conf
Paste exactly this:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Save and exit.
2️⃣ Apply immediately (no reboot needed)
sudo sysctl --system
3️⃣ Verify IPv6 is disabled
ip a | grep inet6
✅ Expected result: no output
(or only ::1 disappears as well)
Also check:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
Should return:
1
Leave a Reply