{"id":537,"date":"2013-08-30T00:04:40","date_gmt":"2013-08-29T23:04:40","guid":{"rendered":"http:\/\/tech.moosaico.com\/blog\/?p=537"},"modified":"2013-08-30T00:04:40","modified_gmt":"2013-08-29T23:04:40","slug":"disabling-ipv6-in-macos-x-or-linux","status":"publish","type":"post","link":"https:\/\/thejoyofstick.com\/blog\/2013\/08\/30\/disabling-ipv6-in-macos-x-or-linux\/","title":{"rendered":"Disabling IPv6 in MacOS X or Linux"},"content":{"rendered":"<p>You may be experiencing slow internet for certain sites if you have a router that doesn&#8217;t work well with IPv6 (Fritz, Hitron) or doesn&#8217;t allow you to change its DNS settings. You are having name resolution time outs.<\/p>\n<p>I&#8217;m assuming you only want IPv4 :-)<\/p>\n<p>The straightforward solution is just to disable IPv6 on your machine.<\/p>\n<h2>How to disable ipv6 in MacOS X<\/h2>\n<p>If you have Leopard or Snow Leopard (10.5 or 10.6) click <code>Apple \/ System Preferences \/ Network<\/code>. Choose <code>Ethernet<\/code> or <code>Airport<\/code> and then <code>Advanced \/ TCP\/IP<\/code>. Choose <code>off<\/code> on <code>Configure IPv6<\/code>.<\/p>\n<p>For Lion or Mountain Lion (10.7 or 10.8) first open a Terminal. To know the name of the network interface you want to edit type<\/p>\n<pre>\r\n$ networksetup -listallnetworkservices\r\n<\/pre>\n<p>And then disable IPv6 like this, for example,<\/p>\n<pre>\r\n$ networksetup -setv6off Wi-Fi\r\n<\/pre>\n<p>Want to get back ?<\/p>\n<pre>\r\n$ networksetup -setv6automatic Wi-Fi\r\n<\/pre>\n<h2>How to disable IPv6 in Linux<\/h2>\n<p>Let&#8217;s suppose you were using WiFi<\/p>\n<pre>\r\n$ ifconfig wlan0\r\nwlan0     Link encap:Ethernet  HWaddr 00:1e:65:f6:84:f4  \r\n          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0\r\n          inet6 addr: fe80::21e:65ff:fef6:84f4\/64 Scope:Link\r\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\r\n          RX packets:34340 errors:0 dropped:0 overruns:0 frame:0\r\n          TX packets:29814 errors:0 dropped:0 overruns:0 carrier:0\r\n          collisions:0 txqueuelen:1000 \r\n          RX bytes:25657649 (25.6 MB)  TX bytes:7569224 (7.5 MB)\r\n<\/pre>\n<p>You can see your interface also is using IPv6.<\/p>\n<pre>\r\n$  sudo sysctl net.ipv6.conf.wlan0.disable_ipv6=1\r\n[sudo] password for biafra: \r\nnet.ipv6.conf.wlan0.disable_ipv6 = 1\r\n\r\n$ ifconfig wlan0\r\nwlan0     Link encap:Ethernet  HWaddr 00:1e:65:f6:84:f4  \r\n          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0\r\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\r\n          RX packets:34507 errors:0 dropped:0 overruns:0 frame:0\r\n          TX packets:29977 errors:0 dropped:0 overruns:0 carrier:0\r\n          collisions:0 txqueuelen:1000 \r\n          RX bytes:25677902 (25.6 MB)  TX bytes:7597685 (7.5 MB)\r\n<\/pre>\n<p>You can disable it between reboots on <code>\/etc\/sysctl.conf<\/code> with this line:<\/p>\n<pre>\r\nnet.ipv6.conf.wlan0.disable_ipv6 = 1\r\n<\/pre>\n<h2>The network problems continue<\/h2>\n<p>Really ? Then maybe it&#8217;s not an IPv6 issue! :-)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may be experiencing slow internet for certain sites if you have a router that doesn&#8217;t work well with IPv6 (Fritz, Hitron) or doesn&#8217;t allow you to change its DNS settings. You are having name resolution time outs. I&#8217;m assuming&hellip; <a href=\"https:\/\/thejoyofstick.com\/blog\/2013\/08\/30\/disabling-ipv6-in-macos-x-or-linux\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,46,13,4],"tags":[71],"class_list":["post-537","post","type-post","status-publish","format-standard","hentry","category-linux","category-mac","category-network","category-ubuntu","tag-ipv6"],"jetpack_shortlink":"https:\/\/wp.me\/pcmwlL-8F","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts\/537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/comments?post=537"}],"version-history":[{"count":16,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts\/537\/revisions"}],"predecessor-version":[{"id":555,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts\/537\/revisions\/555"}],"wp:attachment":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/media?parent=537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/categories?post=537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/tags?post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}