Skip to content

Instantly share code, notes, and snippets.

@humbertodias
Last active August 30, 2020 12:23
Show Gist options
  • Save humbertodias/25454d3956416b60908892d80bd42441 to your computer and use it in GitHub Desktop.
Save humbertodias/25454d3956416b60908892d80bd42441 to your computer and use it in GitHub Desktop.
Linux - Disabling ipv6
Option A:
sudo apt-get -o Acquire::ForceIPv4=true update
Option B:
1. Open Terminal
2. Enter sudo -H gedit /etc/sysctl.conf and open the configuration file and add the following lines at the end
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
After that run
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
If it reports '1' means you have disabled IPV6.
If it reports '0' then please follow Step 4 and Step 5.
4. Type command sudo sysctl -p. You will see this in terminal.
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
5. Repeat above "Step 3" and it will now report 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment