Imagine, it is 2019. Easy, ha? Imagine, it is 2019 and you want to turn off IPv4. Like, off off. Really off. Not disabling IPv6, but disabling IPv4.
Two steps back
You might be coming here wondering, why would anybody want to do what we are asking to be done. Well, it is dead simple: We are running data centers (like Data Center Light) with a lot of IPv6 only equipment. There simply is no need for IPv4. So why would we want to have it enabled?
Also, here at ungleich, we defined 2019 as the year to move away from IPv4.
The challenge
Do you like puzzles? Competitions? Challenges? Hacking? Well. If ANY of this is of your interest, here is a real challenge for you:
We offer a 100 CHF (roughly 100 USD) for anyone who can give us a detailed description of how to turn IPv4 completely off in an operating system and allowing it to communicate with IPv6 only. This should obviously include a tiny proof that your operating system is really unable to use IPv4 at all. Just flushing IPv4 addresses and keeping the IPv4 stack loaded, does not count.
The list
How to disable IPv4 in FreeBSD
The following manual for turning off IPv4 in FreeBSD was submitted to us by Alexander Koponen on 2019-01-10 (it has been briefly edited for fitting the blog format).
Here's my instructions on how to build an IPv6-only host, on FreeBSD, without IPv4 stack
Install FreeBSD-12.0 amd64
- make sure you include the system src package (aka "src")
- When the installer asks "Would you like to configure IPv4 for this interface?" choose "No"
- When the installed asks "Would you like to configure IPv6 for this interface?" choose "Yes"
After system install we can login to machine and ifconfig looks like this:
$ ifconfig vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TS O6,RXCSUM_IPV6,TXCSUM_IPV6> ether 00:0c:29:56:b4:50 inet6 2001:470:de86::abcd prefixlen 64 inet6 fe80::20c:29ff:fe56:b450%vmx0 prefixlen 64 scopeid 0x1 media: Ethernet autoselect status: active nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> $ ping -c 2 127.0.0.1 PING 127.0.0.1 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.044 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.019 ms --- 127.0.0.1 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.019/0.032/0.044/0.012 ms $ ping -c 2 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes ping: sendto: No route to host ping: sendto: No route to host --- 8.8.8.8 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss
Which means it doesn't have ipv4 connectivity, but...it still has the ipv4 stack loaded. Let's fix that! Login as root
# cd /usr/src/sys/amd64/conf make a new file called: GENERIC-IPV6ONLY # vi GENERIC-IPV6ONLY type this in the file: include GENERIC ident GENERIC-IPV6ONLY makeoptions MKMODULESENV+="WITHOUT_INET_SUPPORT=" nooptions INET nodevice gre # cd /usr/src # make buildkernel KERNCONF=GENERIC-IPV6ONLY (now this takes a long time) # make installkernel KERNCONF=GENERIC-IPV6ONLY reboot login as user $ uname -a FreeBSD ipv6-test-0 12.0-RELEASE FreeBSD 12.0-RELEASE GENERIC-IPV6ONLY amd64 $ ifconfig vmx0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=60039b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,TS O6,RXCSUM_IPV6,TXCSUM_IPV6> ether 00:0c:29:56:b4:50 inet6 2001:470:de86::abcd prefixlen 64 inet6 fe80::20c:29ff:fe56:b450%vmx0 prefixlen 64 scopeid 0x1 media: Ethernet autoselect status: active nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 groups: lo nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> $ ping -c 2 127.0.0.1 ping: ssend socket: Address family not supported by protocol family $ ping -c 2 8.8.8.8 ping: ssend socket: Address family not supported by protocol family
Quod erat demonstrandum
How to disable IPv4 in macos
While the following does not turn off IPv4 fully in the kernel, it is a first step for disabling IPv4 in macos and that's why we wanted to document it here:
sudo networksetup -setv4off Wi-Fi
[per interface]. Thanks to Torbjörn Eklöv for the hint!
How to disable IPv4 in Windows
Again the following does NOT yet turn IPv4 fully off (stack stays loaded), but https://disableipv4.se/ lists some steps on how to at least disable it. Again thanks to Torbjörn Eklöv for the hint.
The next operating system
So who and what is it going to be? Are you able to figure out how to turn off IPv4 in your operating system?
The fine print
The 100 CHF will be given out as a coupon for using on either of our IPv6 related products:
- VMs on https://ipv6onlyhosting.com/
- IPv6 VPN as described on our crowdfunding campaign
- Or an IPv6 Penguin T-Shirt!
The 100 CHF will be given out for EACH new detailed report that describes an operating system that we did not yet describe in this article. Derivatives (e.g. Debian <-> Devuan) will only be paid out once. This challenge is valid until 2019-03-03.
Send your solution by email to support at ungleich.ch.