Open yupthatguy opened 3 years ago
You say "I already disabled IPV6 on all interfaces". Can you show how you did that with the actual configuration that you have in place now?
In my /etc/sysctl.conf I have the following: net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1
In my /etc/modrpobe.d/blacklist.conf file I have blacklist ipv6
I tried all the other measures to disable ipv6 mentioned in https://wiki.debian.org/KernelModuleBlacklisting
Lynis always says IPv6 is enabled
Did you also reboot the system and test again?
Many times.. still shows:
- Checking IPv6 configuration [ ENABLED ]
Configuration method [ AUTO ]
IPv6 only [ NO ]
Stale issue message
What additional information do you need? How should I confirm this? The problem happens in both my virtualbox devbian 10.5 test machine and on my prod server (also debian 10.5).
@mboelen The report is generally correct, even though the title is not precise. Test NETW-2600 merely checks for the presence of any sysctl parameters starting with net.ipv6 and if it finds any, it assumes IPv6 is enabled which is not correct. If all net.ipv6.conf.*.disable_ipv6 parameters are set to 1, then IPv6 is effectively disabled. Please note, that this setting must be checked for all interfaces, because if net.ipv6.conf.all.disable_ipv6=1
and net.ipv6.conf.default.disable_ipv6=1
are applied after an interface is set up, then the interface will still have IPv6 enabled.
@yupthatguy A few remarks on your configuration:
blacklist ipv6
in your modprobe configuration is unfortunately not effective. This only prevents loading the module directly. But if a different module is loaded that depends on ipv6, then the ipv6 module will still be loaded which is also why you see all the ipv6 settings in your sysctl output. If you really want to blacklist a module, you should do a fake install by replacing your blacklist statement with install ipv6 /bin/true
. This is also why I said above, that the title of your issue is not precise. It should better be "Lynis ignores IPv6 disabled state" or so.sysctl -a | grep "^net.ipv6"
will return nothing which also makes lynis happy and would work around your false positive report.Thanks for the reply. I will give the grub edit method a try and let you know.
The grub method of disabling IPv6 works like a charm... Lynis now recognizes that IPV6 is disabled. However, there was one mild "side-effect" that folks should be aware of.
Using the grub method to disable IPv6 resulted in dovecot service to fail. However, it was easy enough to fix:
change: listen = *, ::
to
listen = *
Then,
And life is good again..
Describe the bug
Lynis ignores kernel blacklisting of IPv6
I have disabled (blacklisted) the IPV6 kernel module in multiple ways, rebooting multiple times:
https://wiki.debian.org/KernelModuleBlacklisting
But regardless of whatever method that I use, lynis still shows:
[+] Networking
Version
Expected behavior Lynis at some point should confirm that IPV6 is disabled at the kernel level
Output If applicable, add output that you get from the tool or the related section of lynis.log
The output of # sysctl -a | grep "^net.ipv6" is :
Additional context I already disabled IPV6 on all interfaces