1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/bash $NFT -f - <<EOF table inet t { set s { type ipv4_addr . inet_service size 65536 flags dynamic,timeout elements = { 192.168.7.1 . 22 } } chain c { tcp dport 21 add @s { ip saddr . 22 timeout 60s } } } EOF