We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

4.4.16. Disable IPv6 on VPS

In Linux-like operating systems, you can disable IPv6 both for all interfaces and for a specific one. There are generic methods that can be applied to all operating systems.

To disable IPv6 for all interfaces, do the following:
  1. Go to directory /etc/sysctl.d/:
    cd /etc/sysctl.d/
  2. Add to file 99-sysctl.conf the necessary parameters to disable IPv6, which can be done in several ways:
    • By editing the file manually using any convenient editor:
      vi 99-sysctl.conf

      You need to add the following lines to the end of the file:

      net.ipv6.conf.all.disable_ipv6 = 1
      net.ipv6.conf.default.disable_ipv6 = 1
    • Having inserted the necessary lines at the end of the file using the command:
      printf "\n net.ipv6.conf.all.disable_ipv6 = 1 \n net.ipv6.conf.default.disable_ipv6 = 1" >> 99-sysctl.conf
  3. Apply the changes by running the command:
    sysctl -p 
  4. Check that there is no IPv6 configured on the server by running the command:
    ifconfig
To disable IPv6 for a specific interface, do the following:
  1. Determine for which interface you want to disable IPv6. You can list all interfaces using the command:
    ifconfig
    • The command output will look something like this:For example, the desired interface will be called eth0.
  2. Go to directory /etc/sysctl.d/:
    cd /etc/sysctl.d/
  3. Add to file 99-sysctl.conf the necessary parameters to disable IPv6, which can be done in several ways:
    • By editing the file manually using any convenient editor:
      vi 99-sysctl.conf

      At the end of the file you need to add a line:

      net.ipv6.conf.eth0.disable_ipv6 = 1

      Instead eth0 specify the interface you want.

    • By inserting the required line at the end of the file using the command:
      printf "\n net.ipv6.conf.eth0.disable_ipv6 = 1" >> 99-sysctl.conf

      Instead eth0 specify the interface you want.

  4. Apply the changes by running the command:
    sysctl -p 
  5. Check that there is no IPv6 configured on the server by running the command:
    ifconfig