Difference between revisions of "Disable ipv6"

From Wasya Wiki
Jump to: navigation, search
(Created page with "From: https://itsfoss.com/disable-ipv6-ubuntu-linux/ <pre> You have see the sysctl command in the tutorial about restarting network in Ubuntu. We are going to use it here as...")
 
Line 11: Line 11:
 
ip a
 
ip a
 
You should see no IPv6 entry:
 
You should see no IPv6 entry:
 +
</pre>
 +
 +
One method to make this option persist is modifying /etc/sysctl.conf
 +
 +
<pre>
 +
net.ipv6.conf.all.disable_ipv6=1
 +
net.ipv6.conf.default.disable_ipv6=1
 +
net.ipv6.conf.lo.disable_ipv6=1
 
</pre>
 
</pre>

Revision as of 19:28, 12 June 2024

From: https://itsfoss.com/disable-ipv6-ubuntu-linux/

You have see the sysctl command in the tutorial about restarting network in Ubuntu. We are going to use it here as well. To disable IPv6 you only have to input 3 commands:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
You can check if it worked using:

ip a
You should see no IPv6 entry:

One method to make this option persist is modifying /etc/sysctl.conf

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