NetBSD/usr.sbin/ipf/rules/example.5

26 lines
689 B
Groff
Raw Normal View History

1997-09-21 20:47:50 +04:00
#
# test ruleset
#
# allow packets coming from foo to bar through.
#
1998-11-22 17:21:44 +03:00
pass in from 10.1.1.2 to 10.2.1.1
1997-09-21 20:47:50 +04:00
#
# allow any TCP packets from the same subnet as foo is on through to host
# 10.1.1.2 if they are destined for port 6667.
#
1998-11-22 17:21:44 +03:00
pass in proto tcp from 10.2.2.2/24 to 10.1.1.2/32 port = 6667
1997-09-21 20:47:50 +04:00
#
# allow in UDP packets which are NOT from port 53 and are destined for
# localhost
#
1998-11-22 17:21:44 +03:00
pass in proto udp from 10.2.2.2 port != 53 to localhost
1997-09-21 20:47:50 +04:00
#
# block all ICMP unreachables.
#
1998-11-22 17:21:44 +03:00
block in proto icmp from any to any icmp-type unreach
1997-09-21 20:47:50 +04:00
#
# allow packets through which have a non-standard IP header length (ie there
# are IP options such as source-routing present).
#
1998-11-22 17:21:44 +03:00
pass in from any to any with ipopts