Originally Posted by
SkyNigger
Sigh. I feel it is a valid question. sysctl -w returns "readonly variable" errors for all the important sysv's I want to....vary, from on to off.
bash-3.2# man -k ipv6
faith(4) - IPv6-to-IPv4 TCP relay capturing interface
icmp6(4) - Internet Control Message Protocol for IPv6
ip6(4) - Internet Protocol version 6 (IPv6) network layer
ip6(8) - Enable or disable IPv6 on active interfaces
ip6config(8) - Configure IPv6 and 6to4 IPv6 tunnelling
ip6fw(8) - controlling utility for IPv6 firewall (DEPRECATED)
ndp(8) - control/diagnose IPv6 neighbor discovery protocol
tcllib_ip(n) - IPv4 and IPv6 address manipulation
traceroute6(8) - print the route IPv6 packets will take to a network node
bash-3.2# ifconfig en1
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULT ICAST> mtu 1500
ether b8:8d:12:3e:cb:b6
inet6 fe80::ba8d:12ff:fe3e:cbb6%en1 prefixlen 64 scopeid 0x5
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
media: autoselect
status: active
bash-3.2# ip6 -d en1
bash-3.2# ifconfig en1
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULT ICAST> mtu 1500
ether b8:8d:12:3e:cb:b6
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
media: autoselect
status: active
bash-3.2# netstat -nA |grep c6
e2c6338 tcp4 0 0 192.168.1.2.49932 69.171.224.55.443 ESTABLISHED
e2c6db0 tcp4 0 0 192.168.1.2.54486 204.11.221.77.5222 ESTABLISHED
bash-3.2# netstat -nA |grep tcp6
bash-3.2# netstat -nA |grep udp6
dfb4bf8 udp6 0 0 *.50840 *.*
cabf6bc udp6 0 0 *.60923 *.*
cabe3e4 udp6 0 0 *.61029 *.*
cabfaec udp6 0 0 *.61932 *.*
c5454f0 udp6 0 0 *.54851 *.*
c5452d8 udp6 0 0 *.64424 *.*
c5466bc udp6 0 0 *.58356 *.*
13d1eaa0 udp6 0 0 *.64237 *.*
c5451cc udp6 0 0 *.50729 *.*
c547240 udp6 0 0 *.57039 *.*
c547aa0 udp6 0 0 *.5353 *.*
Interesting, /usr/sbin/mDNSresponder binds to ipv6 interfaces.
# man mDNSResponder
mDNSResponder(8) BSD System Manager's Manual mDNSResponder(8)
NAME
mDNSResponder -- Multicast and Unicast DNS daemon
Well then.
bash-3.2# /usr/sbin/mDNSResponder -launchd
bash-3.2# ping well.com
ping: cannot resolve well.com: Unknown host
bash-3.2# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=251 time=27.099 ms
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 27.099/27.099/27.099/0.000 ms
bash-3.2# cat /etc/resolv.conf
#
# Mac OS X Notice
#
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
#
# This file is automatically generated.
#
domain home
nameserver 192.168.1.1
bash-3.2# vi /etc/resolv.conf
bash-3.2# ping well.com
ping: cannot resolve well.com: Unknown host
bash-3.2# ps axuw |grep mDNS
root 21062 0.0 0.0 2434892 576 s005 R+ 2:30PM 0:00.00 grep mDNS
_mdnsresponder 21040 0.0 0.0 2509744 2796 ?? Ss 2:29PM 0:00.03 /usr/sbin/mDNSResponder -launchd
bash-3.2# ping
www.skatzpoker.com
ping: cannot resolve
www.skatzpoker.com: Unknown host
bash-3.2#
bash-3.2# nslookup well.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: well.com
Address: 50.16.199.94
bash-3.2# ping well.com
ping: cannot resolve well.com: Unknown host
bash-3.2#
Perfect, loverly.
Brb, rebooting so mDNSResolver can run "correctly".
Ok back.
So yeah you can disable ipv6 on the interfaces trivially as seen above. But when you start reaching under the skirt of mDNSResolver / launchd / lookupd everything goes batshit. If I wasnt "working" right now I would have discovered/broken down the steps to bring up mDNSResolver in a way that restores services without a reboot but resources are thin and the sword of damacles is often the most suitable tool in the box.
Of course, with ipv6 disabled on the interfaces, I dont see how mDNSResolver would receive any ipv6 traffic, so the open ipv6 ports it uses are pragmatically irrelevant, however that would not be enough for compliance with our standards for success in this exorcize, admittedly.