1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-05-05 00:35:03 +02:00
fwbuilder/test/pf/firewall2-6.conf.orig
Vadim Kurland 15bab71f49 * NATCompiler_ipt.cpp (compile): see #2456 Added support for
single object negation in "Inbound Interface" and "Outbound
Interface" columns in compiler for iptables.

* NATCompiler_pf.cpp (compile): see #2456 Added support for single
object negation in "Interface" rule element of PF NAT rules. Now
compiler can produce PF commands such as "nat on ! em0 ... " (for
PF <4.7) or "match on ! em0 ..." (for PF >= 4.7)

* Compiler.cpp (singleObjectNegation::processNext): moved rule
processor that processes single object negation in any rule
element to the base class Compiler.
2011-06-03 17:54:14 -07:00

68 lines
1.8 KiB
Plaintext

#
# Rule 0 (NAT)
# NETMAP and no -o itf
nat proto {tcp udp icmp} from 192.168.1.0/24 to any -> 22.22.22.0/24
#
# Rule 1 (NAT)
nat on em1 proto {tcp udp icmp} from 192.168.1.0/24 to any -> 222.222.222.40
#
# Rule 2 (NAT)
#
nat on em3 proto {tcp udp icmp} from 192.168.1.0/24 to any -> 222.222.222.40
#
# Rule 3 (NAT)
#
nat on { em1 em3 } proto {tcp udp icmp} from 192.168.1.0/24 to any -> 222.222.222.40
#
# Rule 4 (NAT)
nat on { em1 em3 } proto {tcp udp icmp} from 192.168.1.0/24 to any -> 222.222.222.40
#
# Rule 5 (NAT)
#
nat on ! em3 proto {tcp udp icmp} from 192.168.1.0/24 to any -> 222.222.222.40
#
# Rule 6 (NAT)
#
nat on { em0 em2 } proto {tcp udp icmp} from 192.168.1.0/24 to any -> 222.222.222.40
#
# Rule 7 (NAT)
nat on { em0 em2 } proto {tcp udp icmp} from 192.168.1.0/24 to any -> 222.222.222.40
#
# Rule 8 (NAT)
rdr proto {tcp udp icmp} from any to 222.222.222.40 -> 192.168.1.10
#
# Rule 9 (NAT)
rdr on em0 proto {tcp udp icmp} from any to 222.222.222.40 -> 192.168.1.10
#
# Rule 10 (NAT)
rdr on { em0 em2 } proto {tcp udp icmp} from any to 222.222.222.40 -> 192.168.1.10
#
# Rule 11 (NAT)
rdr on { em0 em2 } proto {tcp udp icmp} from any to 222.222.222.40 -> 192.168.1.10
#
# Rule 12 (NAT)
rdr on ! em0 proto {tcp udp icmp} from any to 222.222.222.40 -> 192.168.1.10
#
# Rule 13 (NAT)
rdr on { em1 em3 } proto {tcp udp icmp} from any to 222.222.222.40 -> 192.168.1.10
#
# Rule 14 (NAT)
rdr on { em1 em3 } proto {tcp udp icmp} from any to 222.222.222.40 -> 192.168.1.10
#
# Rule 15 (NAT)
# REDIRECT
rdr on em0 proto tcp from any to any port 80 -> 127.0.0.1 port 3128
#
# Rule 0 (global)
# 'catch all' rule
block log quick inet from any to any label "RULE 0 -- DROP "
#
# Rule fallback rule
# fallback rule
block quick inet from any to any label "RULE 10000 -- DROP "