Saturday, September 6, 2025

Disable IPv6 in Debian Trixie

Edit /etc/hosts and remove the default IPv6 entries, including localhost, etc. If you don't do this, you may encounter weird errors down the road because some programs will try to bind to "localhost" and it ends up try using non-existing IPv6 address, etc.

Create the follow file:

sudo nano /etc/sysctl.d/90-disable_ipv6.conf

then add these lines and save:

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

Run:

sudo sysctl --system


No comments:

Post a Comment