From 0443e20cfa6c579b1e4e5576ce73b4dcfb7abd1c Mon Sep 17 00:00:00 2001 From: Ruakij Date: Sun, 22 Nov 2026 14:29:19 +0000 Subject: [PATCH] host_firewall: packets from an uplink back out of an uplink drop without a fw-fwd-drop line, they are foreign-address backscatter --- host_firewall/templates/host.nft.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/host_firewall/templates/host.nft.j2 b/host_firewall/templates/host.nft.j2 index 59b20de..ae7171c 100644 --- a/host_firewall/templates/host.nft.j2 +++ b/host_firewall/templates/host.nft.j2 @@ -542,6 +542,12 @@ table inet host { {% endfor %} {% if routed_v6 %} meta nfproto ipv6 oifname { "{{ routed_v6 | join('", "') }}" } accept +{% endif %} +{% if uplink_ifaces and forward_policy == 'drop' %} + # From an uplink back out of an uplink: the datacenter gateway routes packets for foreign addresses of the subnet + # here (backscatter of spoofed traffic, scanner replies). They are not this host's traffic and not forwarded; no log + # line, so the fw-fwd-drop alert stays about forwarding that a network change broke. + iifname { "{{ uplink_ifaces | join('", "') }}" } oifname { "{{ uplink_ifaces | join('", "') }}" } counter drop {% endif %} limit rate {{ firewall.log.in_rate }} log prefix "fw-fwd-drop: " counter