How to Disable IPv6 on Your Webdock Server
Last updated: August 13th 2024
Introduction
This article outlines instructions on how to disable IPv6 on your Webdock server.
This might come handy if you want to disable IPv6, maybe temporarily, to force your server (and the services running) to use IPv4, or for some other reasons.
Prerequisites
- An already provisioned Webdock server
- A sudo shell user
- SSH access to your server.
Temporarily Disabling IPv6
Using sysctl IPv6 can be disabled. However, these changes are not permanent. So after you reboot your server, IPv6 will start working again. If you want IPv6 disabled permanently, skip to the next relevant section.
Execute the below commands to disable IPv6 temporarily.
$ 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
Now, IPv6 will be disabled and pinging an IPv6 address will not work, for example.
Permanently Disabling IPv6
For Ubuntu/Debian servers:
To disable IPv6, run
For Ubuntu:
$ sudo nano /etc/netplan/50-cloud-init.yaml
Comment the IPv6 lines with "#" so that it looks something like this:
For Debian:
$ sudo nano /etc/systemd/network/10-cloud-init-eth0.network
Comment the IPv6 lines with "#" so that it looks something like this:
Reboot the server now for the changes to take affect.
If you want to re-enable IPv6, just undo the changes (remove the "#"s) and reboot your server.
For AlmaLinux/CentOS servers:
On AlmaLinux and CentOS servers, we use NetworkManager to configure network. To disable IPv6, run
$ sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
Comment the IPv6 lines with "#" so that it looks something like this:
Reboot the server now for the changes to take affect.
If you want to re-enable IPv6, just undo the changes (remove the "#"s) and reboot your server
Conclusion
This article outlined steps to disable IPv6 on your Webdock server either temporarily or permanently.
Contact Webdock Support if you run into any errors or need further assistance.
Related articles
-
Optimizing Network Speed on Your Webdock KVM Server
A mini article with some kernel tweaks to improve network performance on your server
Last updated: September 6th 2024
-
How to configure Crontab on Linux
In this article we detail how Crontab works and all the available options for configuration along with correct syntax and examples.
Last updated: January 4th 2024
-
How to free up disk space on an Ubuntu Nginx or Apache Web Server
This article outlines useful commands you can run on your server in order to free up disk space.
Last updated: October 16th 2023
-
How to monitor webdock server resources using Prometheus, Grafana, Node Exporter and Prometheus Alert Manager
This guide includes the step by step procedure of installing different packages like Prometheus, Grafana, Node exporter and Alert Manager.
Last updated: December 7th 2022
-
Automating Initial Server Configuration with Ansible
Read our new article: Learn how to automate your cloud server configuration using Ansible.
Last updated: July 19th 2023
-
Top Tools to Install on Your Ubuntu Web Server
A list of important tools that you can install on your production Ubuntu web server
Last updated: July 19th 2023
-
How To Benchmark Your Server with YABS
A guide to do benchmarking of your server's CPU, network performance, and such using YABS.
Last updated: April 1st 2024
-
Systemd Units - A Comprehensive Guide for Linux Admins
A detailed guide on systemd internals for Linux admins
Last updated: August 13th 2024
-
A Quick Guide to Managing Systemd Services
A short guide that helps you manage systemd services
Last updated: August 13th 2024
-
How to Benchmark PHP Performance on Your Webdock Server
Instructions for bechmarking PHP performance on your Webdock server
Last updated: August 29th 2024
-
Why don't I have the memory or disk allowance that I expect?
In this article we show why inside your instance you may see lower than expected RAM or DISK allowance available. It has all to do with units!
Last updated: November 29th 2024