1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/bin/bash set -e RULESET="table ip t { set set1 { type ether_addr } set set2 { type ether_addr size 65535 flags dynamic } chain c { ether daddr @set1 add @set2 { ether daddr counter } } }" $NFT -f - <<< "$RULESET" || { echo "can't apply basic ruleset"; exit 1; }