#!/bin/bash set -e RULESET="define whitelist_v4 = { 1.1.1.1 } table inet filter { set whitelist_v4 { type ipv4_addr; } } add element inet filter whitelist_v4 \$whitelist_v4 " $NFT -f - <<< "$RULESET"