Skip to content

Instantly share code, notes, and snippets.

@lucasmaurice
Last active April 27, 2021 18:08
Show Gist options
  • Save lucasmaurice/ba2b0e72963683a5e395ff2ed20a8825 to your computer and use it in GitHub Desktop.
Save lucasmaurice/ba2b0e72963683a5e395ff2ed20a8825 to your computer and use it in GitHub Desktop.
CentOS Disable IPv6.

Run this:

bash <(curl -s https://gist.github.com/lucasmaurice/ba2b0e72963683a5e395ff2ed20a8825/raw/987bb7f87749ffe1d05e7e0db4f6d4910c2d8a65/disable-ipv6.sh)
echo "net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
" | sudo tee -a /etc/sysctl.d/70-ipv6.conf
sudo sysctl --load /etc/sysctl.d/70-ipv6.conf
sudo nmcli connection modify ens192 ipv6.method ignore
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment