Disable IPv6

We had World IPv6 launch day last week, when major websites and ISP turn on IPv6 permanently. I also have a IPv6 enabled for my server, but the problem is it's not working. When I tried to get a file with wget, I got:
Connecting to iweb.dl.sourceforge.net|2607:f748:10:12::5f:2|:80... failed: Connection timed out.
So instead of using "wget", just use "wget -4" to force wget using IPv4. Problem solved? Actually no. When I do apt-get or "gem install", I have no way to tell it to use IPv4. So I just do this to disable IPv6 on my server completely:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
Sorry, da internet, when both you and I are ready, I will turn on IPv6 again.


Anonymous said...

Thanks for the post. The echo command helped me a lot, although I used it with Debian.
I wanted to use debian apt-get to update the system with ipv6 enabled, but because ipv6 acces to other sites was blocked by the firewall I had to use ipv4.
So I used echo 0 to disable ipv6, then echo 1 to enable it again.

MaryJohn said...

good one

MaryJohn said...

Two versions of the IP are in use: IP Version 4 and IP Version 6.In IPv4 an address consists of 32 bits and the IP v6 uses from 32 to 128 bits.I have an IPv4 when I checked through Ip-details.com