summaryrefslogtreecommitdiffstats
path: root/tests/family-ipv4
blob: e744f028614877c04cb455ab2af43abd8bf3065b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! nft -f

flush chain ip filter output
delete chain ip filter output
delete table filter

add table ip filter
add chain ip filter output { hook NF_INET_LOCAL_IN 0; }

# IP address
add rule ip filter output ip daddr 192.168.0.1 counter

# TCP ports
add rule ip filter output tcp dport 22 counter