1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/bash set -e EXPECTED="table ip x { set y { typeof ip saddr counter elements = { 192.168.10.35, 192.168.10.101, 192.168.10.135 } } chain z { type filter hook output priority filter; policy accept; ip daddr @y } }" $NFT -f - <<< "$EXPECTED"