X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ccfa52cb5bce88a14e36a9967c5803570321c325..7bcced377bf4a50fc27d6e6fa4d0b180a78807d2:/cookbooks/networking/templates/default/nftables.conf.erb?ds=inline diff --git a/cookbooks/networking/templates/default/nftables.conf.erb b/cookbooks/networking/templates/default/nftables.conf.erb index cd48c0b7f..63f45a0c8 100644 --- a/cookbooks/networking/templates/default/nftables.conf.erb +++ b/cookbooks/networking/templates/default/nftables.conf.erb @@ -5,12 +5,19 @@ define external-interfaces = { <%= @interfaces.sort.uniq.join(", ") %> } define ip-private-addresses = { 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.2.0/24, 192.168.0.0/16 } define ip6-private-addresses = { 2001:db8::/32, fc00::/7 } -define ip-osm-addresses = { <%= Array(@hosts[:inet]).sort.join(", ") %> } -define ip6-osm-addresses = { <%= Array(@hosts[:inet6]).sort.join(", ") %> } - flush ruleset table inet filter { + set ip-osm-addresses { + type ipv4_addr + elements = { <%= Array(@hosts["inet"]).sort.join(", ") %> } + } + + set ip6-osm-addresses { + type ipv6_addr + elements = { <%= Array(@hosts["inet6"]).sort.join(", ") %> } + } + set ip-blacklist { type ipv4_addr flags dynamic