• Health tips to prevent the spread of COVID-19:
    • Wash your hands frequently;
    • Maintain 2 meters social distancing;
    • Minimise outdoor activities.
    Stay safe in your bubble!

How to Disable IPv6 on Ubuntu Linux

Andy

Administrator
User ID
1
Joined
7 Jan 2019
Messages
254
Reaction score
8
Points
18
This tutorial will guide you with the exact commands/steps you need to run on your server in order to disable IPv6 connectivity on your Ubuntu Server, all in under one minute!

Log into your Ubuntu server via console or SSH as root (Use the command sudo -s in terminal)

Open /etc/sysctl.conf using nano editor:
Bash:
nano /etc/sysctl.conf
Scroll all the way down, and add the following lines at the end:
Code:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
When logged in as root, run the below command to apply the changes:
Bash:
sysctl -p
To verify IPv6 is now disabled on your server, run:
Bash:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
The result should return ‘1’ – which indicates that IPv6 is disabled.

Need any help? Running into any problems when trying to disable IPv6 on your server? Feel free to leave your feedback in the comments section below!
 
 Short URL:
Top