mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
services: nftables: Tighten the default rules.
Packets for local host IP ranges should be coming only over lo. If that is not the case, we should drop them. Use iif for the check instead of iifname, lo is guaranteed to exists, and iif is faster. * gnu/services/networking.scm (%default-nftables-ruleset): Tighten the rules. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
6156bf9078
commit
82f9e5ac97
1 changed files with 4 additions and 1 deletions
|
@ -1813,7 +1813,10 @@ (define %default-nftables-ruleset
|
|||
ct state { established, related } accept
|
||||
|
||||
# allow from loopback
|
||||
iifname lo accept
|
||||
iif lo accept
|
||||
# drop connections to lo not coming from lo
|
||||
iif != lo ip daddr 127.0.0.1/8 drop
|
||||
iif != lo ip6 daddr ::1/128 drop
|
||||
|
||||
# allow icmp
|
||||
ip protocol icmp accept
|
||||
|
|
Loading…
Reference in a new issue