{% if backup_clients -%} table filter { chain INPUT { saddr ({% for client in backup_clients %} {{ client.ip }}{% endfor %}) @subchain "backup_in" { # SSH proto tcp dport 2222 ACCEPT; } } } {%- endif %}