I've just about pulled all of my hair out trying to figure this out. I vaguely recall (several months ago now) absentmindedly consenting to "configure this interface for IPv6" or to "enable IPv6" during installation. I really hadn't given it a lot of thought, though I've recently read the spec for it and find it atrocious and, from a security standpoint, heart-stoppingly-horrifying. That, of course, is only tangentially related to the post.
Having spent the better part of the past two days trying, in vain I might add, to completely disable IPv6 in the kernel, I can't seem to do it. I've added the obligatory lines to /etc/rc.conf:
Those were selected from a handful of online posts that seemed related, and from running through the /etc/defaults/rc.conf file and finding any seemingly relevant IPv6 settings and saying "NO!"
However, these haven't achieved the desired goal. Essentially, what I would like to see when I check the sysctl for the kernel ipv6 feature is as follows:
Short of that, I would at least appreciate it if, after booting, I can do a
If this requires a custom kernel, then so be it -- I'm sure there's a way to undefine INET6 and leave it all out of the kernel. If that's not possible and there's really no easy way to do it, then I will write a kernel module to kill as much of it as is possible, though I highly doubt it'll come to that. I'm hoping for someone to say, "hey, idiot, add this to loader.conf or set this in rc.conf, sysctl.conf or some other one-liner."
Any help would be greatly appreciated!
Having spent the better part of the past two days trying, in vain I might add, to completely disable IPv6 in the kernel, I can't seem to do it. I've added the obligatory lines to /etc/rc.conf:
Code:
ip6addrctl_enable="NO"
ip6addrctl_policy="ipv4_prefer"
ipv6_activate_all_interfaces="NO"
ipv6_network_interfaces="none"
However, these haven't achieved the desired goal. Essentially, what I would like to see when I check the sysctl for the kernel ipv6 feature is as follows:
Code:
sysctl -n kern.features.inet6
0
Short of that, I would at least appreciate it if, after booting, I can do a
netstat -nr and not see a handful of IPv6 routes. (I'd also very much appreciate not seeing two inet6 addrs for lo0 -- ::1 and some link-local junk that it adds.) (For clarification, yes, even after appending the aforementioned lines in rc.conf loopback still comes up with a pair of inet6 addresses, my tun0 address adds one (link local) and there are about a dozen or so routes in my routing table which I would have posted had I not immediately gone through and manually deleted them -- along with the inet6 entries for all interfaces -- after I booted.)If this requires a custom kernel, then so be it -- I'm sure there's a way to undefine INET6 and leave it all out of the kernel. If that's not possible and there's really no easy way to do it, then I will write a kernel module to kill as much of it as is possible, though I highly doubt it'll come to that. I'm hoping for someone to say, "hey, idiot, add this to loader.conf or set this in rc.conf, sysctl.conf or some other one-liner."
Any help would be greatly appreciated!