paulbsd-salt/states/nftables/blacklist.nft.j2

8 lines
247 B
Plaintext
Raw Normal View History

2022-01-02 17:39:23 +01:00
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
2022-01-02 18:01:47 +01:00
{% set blackips = salt["bl.get_ips"]() %}
{% if len(blackips) > 0 %}
2022-01-02 18:03:31 +01:00
define blacklist = { {{ blackips.join(",") }} }
2022-01-02 18:01:47 +01:00
{% else %}
2022-01-02 17:39:23 +01:00
define blacklist = { 127.255.255.255 }
2022-01-02 18:01:47 +01:00
{% endif %}