Another update. Clarify that a shared spinlock can be acquired while holding
[dragonfly.git] / share / examples / ipfilter / example.14
1 # $FreeBSD: src/share/examples/ipfilter/example.14,v 1.1.2.1 2002/04/27 20:04:18 darrenr Exp $
2 # $DragonFly: src/share/examples/ipfilter/example.14,v 1.2 2003/06/17 04:36:57 dillon Exp $
3 #
4 # log all inbound packet on le0 which has IP options present
5 #
6 log in on le0 from any to any with ipopts
7 #
8 # block any inbound packets on le0 which are fragmented and "too short" to
9 # do any meaningful comparison on.  This actually only applies to TCP
10 # packets which can be missing the flags/ports (depending on which part
11 # of the fragment you see).
12 #
13 block in log quick on le0 from any to any with short frag
14 #
15 # log all inbound TCP packets with the SYN flag (only) set
16 #  (NOTE: if it were an inbound TCP packet with the SYN flag set and it
17 #         had IP options present, this rule and the above would cause it
18 #         to be logged twice).
19 #
20 log in on le0 proto tcp from any to any flags S/SA
21 #
22 # block and log any inbound ICMP unreachables
23 #
24 block in log on le0 proto icmp from any to any icmp-type unreach
25 #
26 # block and log any inbound UDP packets on le0 which are going to port 2049
27 # (the NFS port).
28 #
29 block in log on le0 proto udp from any to any port = 2049
30 #
31 # quickly allow any packets to/from a particular pair of hosts
32 #
33 pass in quick from any to 10.1.3.2/32
34 pass in quick from any to 10.1.0.13/32
35 pass in quick from 10.1.3.2/32 to any
36 pass in quick from 10.1.0.13/32 to any
37 #
38 # block (and stop matching) any packet with IP options present.
39 #
40 block in quick on le0 from any to any with ipopts
41 #
42 # allow any packet through
43 #
44 pass in from any to any
45 #
46 # block any inbound UDP packets destined for these subnets.
47 #
48 block in on le0 proto udp from any to 10.1.3.0/24
49 block in on le0 proto udp from any to 10.1.1.0/24
50 block in on le0 proto udp from any to 10.1.2.0/24
51 #
52 # block any inbound TCP packets with only the SYN flag set that are
53 # destined for these subnets.
54 #
55 block in on le0 proto tcp from any to 10.1.3.0/24 flags S/SA
56 block in on le0 proto tcp from any to 10.1.2.0/24 flags S/SA
57 block in on le0 proto tcp from any to 10.1.1.0/24 flags S/SA
58 #
59 # block any inbound ICMP packets destined for these subnets.
60 #
61 block in on le0 proto icmp from any to 10.1.3.0/24
62 block in on le0 proto icmp from any to 10.1.1.0/24
63 block in on le0 proto icmp from any to 10.1.2.0/24