{"id":6473,"date":"2017-02-11T15:50:44","date_gmt":"2017-02-11T07:50:44","guid":{"rendered":"http:\/\/rmohan.com\/?p=6473"},"modified":"2017-02-11T15:50:44","modified_gmt":"2017-02-11T07:50:44","slug":"disable-ipv6-on-linux-centos","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6473","title":{"rendered":"Disable IPv6 on Linux (CentOS)"},"content":{"rendered":"<p>Disable IPv6 on Linux (CentOS)<\/p>\n<p>Just put this into \/etc\/sysctl.conf. No need to mess with the IPv6 modules.<\/p>\n<p>net.ipv6.conf.all.disable_ipv6 = 1<br \/>\nnet.ipv6.conf.default.disable_ipv6 = 1<\/p>\n<p>And also inet_protocols = ipv4 in \/etc\/postfix\/main.cf<\/p>\n<p>Why would you want to do that? I have a rogue IPv6 router advertising going on in my network that I can\u2019t block. That results in Linux boxes assigning themselves an IPv6 address from that \u201cforeign\u201d router. This can cause trouble when sending eMail. For example DirectAdmins exim tries to send out via IPv6 by default and if there\u2019s no PTR set for that IP eMails might not get delivered: \u201c550-inconsistent or no DNS PTR record for 2a01:\u2026\u201d. The true solution is to set a PTR, remove the rogue RA or properly enable IPv6 on own network equipment with PTRs, so this is just a dirty workaround.<\/p>\n<p>PS: If postfix doesn\u2019t start up after you disabled IPv6 and complains with the error message \u201cfatal: parameter inet_interfaces: no local interface found for ::1\u201d then you could remove ::1 from \/etc\/hosts and postfix will run again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Disable IPv6 on Linux (CentOS)<\/p>\n<p>Just put this into \/etc\/sysctl.conf. No need to mess with the IPv6 modules.<\/p>\n<p>net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1<\/p>\n<p>And also inet_protocols = ipv4 in \/etc\/postfix\/main.cf<\/p>\n<p>Why would you want to do that? I have a rogue IPv6 router advertising going on in my network that I can\u2019t block. That [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6473"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6473"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6473\/revisions"}],"predecessor-version":[{"id":6474,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6473\/revisions\/6474"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}