{"id":444,"date":"2025-01-10T15:19:17","date_gmt":"2025-01-10T15:19:17","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2025\/01\/10\/10374632-how-to-disable-ipv6-on-linux-distributions\/"},"modified":"2026-09-03T05:49:36","modified_gmt":"2026-09-03T05:49:36","slug":"10374632-how-to-disable-ipv6-on-linux-distributions","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/10374632-how-to-disable-ipv6-on-linux-distributions\/","title":{"rendered":"How to disable IPv6 on Linux Distributions at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">Although we advise against permanently disabling IPv6 on your <a href=\"https:\/\/www.hostinger.com\/tutorials\/what-is-vps-hosting\/\">VPS<\/a>, temporarily turning off the protocol can be helpful for troubleshooting network issues. This guide explains how to disable IPv6 on your VPS.<\/p><h2 id=\"h_759d3fce9a\"><b>Red Hat-based Linux Distributions<\/b><\/h2><p class=\"no-margin\">If you&rsquo;re using a Red Hat-based system, follow these steps to disable IPv6:<\/p><ul>\n<li>\n<p class=\"no-margin\">Login to your VPS using <code>ssh root@your-vps-ip<\/code> or enter your VPS <a href=\"https:\/\/www.hostinger.com\/support\/how-to-use-the-web-console-in-hostinger\/\">using the web console<\/a>&nbsp;from <a href=\"https:\/\/www.hostinger.com\/support\/5726606-how-to-use-the-vps-dashboard-in-hostinger\/\">VPS dashboard<\/a>.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Enter the following commands:<\/p>\n<\/li>\n<\/ul><pre><code>sysctl -w net.ipv6.conf.all.disable_ipv6=1\r\nsysctl -w net.ipv6.conf.default.disable_ipv6=1\r\nsysctl -w net.ipv6.conf.tun0.disable_ipv6=1<\/code><\/pre><p class=\"no-margin\">To enable IPv6 again, use these commands:<\/p><pre><code>sysctl -w net.ipv6.conf.all.disable_ipv6=0\r\nsysctl -w net.ipv6.conf.default.disable_ipv6=0\r\nsysctl -w net.ipv6.conf.tun0.disable_ipv6=0\r\nsysctl -p<\/code><\/pre><h2 id=\"h_f9178318b2\"><b>Debian-based Linux Distributions<\/b><\/h2><p class=\"no-margin\">For Debian-based systems, here&rsquo;s how to disable IPv6:<\/p><ul>\n<li>\n<p class=\"no-margin\">Open a terminal using the same methods as mentioned previously.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Run the following command to edit the configuration file:<\/p>\n<\/li>\n<\/ul><pre><code>sudo nano \/etc\/sysctl.conf<\/code><\/pre><ul>\n<li>\n<p class=\"no-margin\">Add these lines to the bottom of the file:<\/p>\n<\/li>\n<\/ul><pre><code>net.ipv6.conf.all.disable_ipv6=1\r\nnet.ipv6.conf.default.disable_ipv6 = 1\r\nnet.ipv6.conf.lo.disable_ipv6 = 1\r\nnet.ipv6.conf.tun0.disable_ipv6 = 1<\/code><\/pre><ul>\n<li>\n<p class=\"no-margin\">Save the changes by pressing <b>CTRL X<\/b>, then <b>Y<\/b> and <b>Enter<\/b> to close the file.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Reboot your device.<\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">To re-enable IPv6, simply delete the lines you added to \/etc\/sysctl.conf and reboot your system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although we advise against permanently disabling IPv6 on your VPS, temporarily turning off the protocol can be helpful for troubleshooting network issues. This guide explains&#8230;<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[199],"tags":[],"class_list":["post-444","post","type-post","status-publish","format-standard","hentry","category-vps-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/10374632-how-to-disable-ipv6-on-linux-distributions\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=444"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/444\/revisions"}],"predecessor-version":[{"id":17816,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/444\/revisions\/17816"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}