]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
sysctl: For the sake of completeness, do not accept IPv6 redirects
authorPeter Müller <peter.mueller@ipfire.org>
Tue, 7 Jun 2022 20:09:07 +0000 (20:09 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Mon, 13 Jun 2022 15:48:45 +0000 (15:48 +0000)
While IPFire 2.x' web interface does not support IPv6, users can
technically run it with IPv6 by conducting the necessary configuration
changes manually.

To provide these systems as well, we should disable acceptance of ICMPv6
redirect packets - which is apparently not default in Linux, yet. :-/

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
config/etc/sysctl.conf

index 7fe397bb71a1fa7b6ce21aae58e7cf5ade8da932..6bf3bc8875a92c3eecf0fd134d2822e9888cd806 100644 (file)
@@ -31,6 +31,10 @@ vm.min_free_kbytes = 8192
 net.ipv6.conf.all.disable_ipv6 = 1
 net.ipv6.conf.default.disable_ipv6 = 1
 
+# However, enable some IPv6 hardening sysctl's in case this system is run customly _with_ IPv6.
+net.ipv6.conf.all.accept_redirects = 0
+net.ipv6.conf.default.accept_redirects = 0
+
 # Enable netfilter accounting
 net.netfilter.nf_conntrack_acct = 1