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