Skip to content

Instantly share code, notes, and snippets.

@palawer
Created January 31, 2025 15:28
Show Gist options
  • Save palawer/8cffa0b693a25ae2083802450115fcef to your computer and use it in GitHub Desktop.
Save palawer/8cffa0b693a25ae2083802450115fcef to your computer and use it in GitHub Desktop.
Disable IPv6 System-Wide

Disable IPv6 System-Wide

Temporarily disable IPv6:

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

To disable IPv6 permanently, add these lines to /etc/sysctl.conf:

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

Then apply changes:

sudo sysctl -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment