-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsample_nftables-mixed-multiple-headers-combo.pol
80 lines (68 loc) · 1.71 KB
/
sample_nftables-mixed-multiple-headers-combo.pol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Test rendering for multiple nftables policies.
header {
comment:: "Noverbose + custom priority policy example"
target:: nftables mixed INPUT 300
}
term multi-all-families {
comment:: "Validate multiple protocols."
protocol:: udp tcp icmp icmpv6
action:: accept
}
term multi-proto-term {
comment:: "Validate multiple protocols. IPv6 icmp should not render."
protocol:: udp tcp icmp
action:: accept
}
header {
comment:: "Noverbose + custom priority policy example"
target:: newnftables mixed INPUT 400
}
term test-tcp-icmp {
comment:: "Allow ICMP from company."
source-address:: PUBLIC_NAT
protocol:: udp tcp icmp
action:: accept
}
header {
comment:: "Noverbose + custom priority policy example"
target:: newnftables mixed OUTPUT
}
term test-icmp {
comment:: "Allow ICMP from company."
source-address:: PUBLIC_NAT
protocol:: icmp
action:: accept
}
term test-icmp-type-ip4 {
comment:: "IPv4 icmp-type test"
icmp-type:: echo-request echo-reply
protocol:: icmp
action:: accept
}
term test-icmp-type-ip6 {
comment:: "IPv6 icmp-type test"
icmp-type:: multicast-listener-done router-solicit router-advertisement
protocol:: icmpv6
action:: accept
}
term full-combo-term {
comment:: "Test src/dest 80 - with addresses"
source-address:: CLOUDFLARE_PUBLIC_DNS
destination-address:: GOOGLE_PUBLIC_DNS_ANYCAST
protocol:: tcp
source-port:: HTTP
destination-port:: HTTP
action:: accept
}
term multi-all-families {
comment:: "Validate multiple protocols."
protocol:: udp tcp icmp icmpv6
action:: accept
}
term base-traceroute-in {
comment:: "Ensure we can output a port-range."
protocol:: udp
source-port:: TRACEROUTE
destination-port:: HIGH_PORTS
action:: accept
}