#!/bin/bash set -e RULESET="table ip nat { set set_with_interval { type ipv4_addr flags interval } chain prerouting { type nat hook prerouting priority dstnat; policy accept; meta l4proto { tcp, udp } th dport 443 dnat to 10.0.0.1 } }" $NFT -f - <<< $RULESET