1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-23 11:47:24 +01:00
fwbuilder/test/pf/firewall8.conf.orig
Vadim Kurland 6a9fdbf3af NATCompiler_pf.cpp (_expand_addr): see #2455 NAT Compiler for PF
should use "(interface)" syntax to the right of "->" in NAT rules.
This now works for all interfaces, including those that have ip
addresses in fwbuilder configuration, when interface object appears in
"Translated Source" in a nat rule. When firewall object appears in
"Translated Source", it gets replaced with a set of its interfaces
which also get translated into "-> (interface)".
2011-06-03 18:59:44 -07:00

62 lines
1.7 KiB
Plaintext

# Tables: (2)
table <tbl.r3> { ppp0 , 33.33.33.33 , 33.33.33.34 , 192.168.1.1 }
table <tbl.r4.d> { 33.33.33.33 , 33.33.33.34 }
#
# Rule 0 (NAT)
nat on eth1 proto {tcp udp icmp} from 192.168.1.0/24 to any -> (eth1)
nat on eth0 proto {tcp udp icmp} from 192.168.1.0/24 to any -> (eth0)
nat on ppp0 proto {tcp udp icmp} from 192.168.1.0/24 to any -> (ppp0)
#
# Rule 1 (NAT)
nat on eth1 proto {tcp udp icmp} from 192.168.1.0/24 to any -> (eth1)
#
# Rule 2 (NAT)
nat on eth1 proto {tcp udp icmp} from 192.168.1.0/24 to any -> 33.33.33.33
#
# Rule 3 (NAT)
rdr proto tcp from any to <tbl.r3> port 22 -> 192.168.1.100 port 22
#
# Rule 4 (NAT)
rdr on eth1 proto tcp from any to 33.33.33.34 port 22 -> 192.168.1.100 port 22
#
# Rule 5 (NAT)
rdr on eth1 proto tcp from any to 33.33.33.34 port 22 -> 192.168.1.100 port 22
#
# Rule 6 (NAT)
rdr on eth1 proto tcp from any to 33.33.33.34 port 22 -> 192.168.1.100 port 22
#
# Rule 7 (NAT)
rdr on eth1 proto tcp from any to 33.33.33.34 port 22 -> 192.168.1.100 port 22
#
# Rule 8 (NAT)
rdr proto tcp from 192.168.1.0/24 to any port 80 -> (eth1) port 80
#
# Rule 0 (global)
pass inet from any to any
#
# Rule 1 (global)
pass log inet from any to any
#
# Rule 2 (global)
pass quick inet proto tcp from any to 33.33.33.33 port 22 flags S/SA keep state
#
# Rule 3 (global)
pass quick inet proto tcp from any to 33.33.33.34 port 22 flags S/SA keep state
#
# Rule 4 (global)
pass quick inet proto tcp from any to <tbl.r4.d> port 22 flags S/SA keep state
#
# Rule 5 (global)
block log quick inet from any to any
#
# Rule fallback rule
# fallback rule
block quick inet from any to any