Howto – Disable IPV6 on Linux

On a Debian system:

$ sudo nano /etc/sysctl.conf 

Add the following at the bottom of the file:

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

Save and close the file.

Reboot the machine.

To re-enable IPv6, remove the above lines from /etc/sysctl.conf and reboot the machine.

On a RedHat system:

Here’s how to disable the protocol on a Red Hat-based system:

Open a terminal window.

Change to the root user.

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

To re-enable IPv6, issue the following commands:

$ sysctl -w net.ipv6.conf.all.disable_ipv6=0 
$ sysctl -w net.ipv6.conf.default.disable_ipv6=0 

Published by

Ronny Van den Broeck

I'm a network and system engineer for more than 20 years now. During this period I became a pro in hunting down one's and zero's, with an eager mindset to help people accomplish the same or abstract them away from the matrix.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s