1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash set -e RULESET="table ip x { chain foo { icmp id 42 } }" $NFT -f - <<< $RULESET $NFT insert rule ip x foo index 0 accept