{"id":7088,"date":"2020-05-29T12:18:24","date_gmt":"2020-05-29T10:18:24","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=7088"},"modified":"2020-05-29T13:14:35","modified_gmt":"2020-05-29T11:14:35","slug":"linux-disable-ipv6","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/linux-disable-ipv6\/","title":{"rendered":"Linux: Disable IPv6"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_7088 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_7088')){$('.twoclick_social_bookmarks_post_7088').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Linux%3A%20Disable%20IPv6\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Ato%20disable%20IPv6%20on%20a%20Linux%20system%20you%20have%20to%20set%20some%20variables%20with%20sysctl.%20%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/linux-disable-ipv6\\\/\",\"post_id\":7088,\"post_title_referrer_track\":\"Linux%3A+Disable+IPv6\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>to disable IPv6 on a Linux system you have to set some variables with sysctl.<br \/>\n<!--more--><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nroot@debdev ~ # sysctl -w net.ipv6.conf.all.disable_ipv6=1\r\nroot@debdev ~ # sysctl -w net.ipv6.conf.default.disable_ipv6=1\r\nroot@debdev ~ # sysctl -w net.ipv6.conf.lo.disable_ipv6=1\r\n<\/pre>\n<p>The settings switches IPv6 immediately off.<\/p>\n<p>This can also be set in the <strong>\/proc<\/strong> filesystem <\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nroot@debdev ~ # ls -l \/proc\/sys\/net\/ipv6\/conf\r\ndr-xr-xr-x 1 root root 0 May 29 11:04 all\r\ndr-xr-xr-x 1 root root 0 May 29 11:04 default\r\ndr-xr-xr-x 1 root root 0 May 29 09:20 eth0\r\ndr-xr-xr-x 1 root root 0 May 29 09:20 lo\r\nroot@debdev ~ # echo 1 &gt; \/proc\/sys\/net\/ipv6\/conf\/all\/disable_ipv6\r\nroot@debdev ~ # cat \/proc\/sys\/net\/ipv6\/conf\/all\/disable_ipv6\r\n1\r\n<\/pre>\n<p>But this does not survive a reboot. You have to add those variables to \/etc\/sysctl.conf or create a file \/etc\/sysctl.d\/10-disable-IPv6.conf with the following content<\/p>\n<p><code><br \/>\nnet.ipv6.conf.all.disable_ipv6=1<br \/>\nnet.ipv6.conf.default.disable_ipv6=1<br \/>\nnet.ipv6.conf.lo.disable_ipv6=1<br \/>\n<\/code><\/p>\n<p>To read and set the values from the sysctl file(s) use<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nroot@debdev ~ # sysctl -p\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, to disable IPv6 on a Linux system you have to set some variables with sysctl.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[62,1449,224,1450],"class_list":["post-7088","post","type-post","status-publish","format-standard","hentry","category-linux","tag-disable","tag-ipv6","tag-linux-2","tag-sysctl"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=7088"}],"version-history":[{"count":7,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7088\/revisions"}],"predecessor-version":[{"id":7097,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7088\/revisions\/7097"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=7088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=7088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=7088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}