How to Disable IPv6 on Ubuntu


Disable IPv6 addresses on Ubuntu

IPv6 may be undesirable in certain situations, for systems that can run without IPv6 and only operate on IPv4, the IPv6 protocol stack can be disabled.

On Debian and Ubuntu the IPv6 stack can be disabled as follows

If only one certain interface should run without IPv6, e.g. ens160.

Save the sysctl.conf file and enable the setting.

If you want to deactivate IPv6 during operation, the following command applies.

IPv6 is now disabled, a reboot is not necessary.

If the removal of IPv6 for running services is a disaster, e.g. SSH server, the configuration can be adjusted.

Then restart the SSH daemon.

Postfix may also require to customize the ipv4 loopback interface.

Checking for IPv6 addresses.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *