-
Notifications
You must be signed in to change notification settings - Fork 210
/
Copy pathsample_nftables-mixed-icmp.pol
67 lines (58 loc) · 1.52 KB
/
sample_nftables-mixed-icmp.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
#
# NFTables generator policy example.
# Intended to render ICMP terms for both IPv4 and IPv6 families.
#
header {
comment:: "This policy expected to test every combination of REQUIRED keywords."
target:: nftables mixed INPUT
}
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
}
term test-tcp-icmp {
comment:: "Allow ICMP from company."
source-address:: PUBLIC_NAT
protocol:: udp tcp icmp
action:: accept
}
term test-icmp {
comment:: "Allow ICMP from source-address."
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 multicast-router-solicitation multicast-router-advertisement
protocol:: icmpv6
action:: accept
}
term full-combo-term {
comment:: "Test src/dest 80 - No addresses"
source-address:: CLOUDFLARE_PUBLIC_DNS
destination-address:: GOOGLE_PUBLIC_DNS_ANYCAST
protocol:: tcp
source-port:: HTTP
destination-port:: HTTP
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
}