1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 11:17:31 +01:00

see #2069 PF: allow multiple objects in ODst of redirecting nat rule

This commit is contained in:
Vadim Kurland 2011-02-10 11:25:52 -08:00
parent 04a118ac0a
commit 383d9e41d9
69 changed files with 383 additions and 310 deletions

View File

@ -1,5 +1,9 @@
2011-02-10 vadim <vadim@netcitadel.com>
* NATCompiler_pf.cpp (processNext): fixes #2069 "PF: allow
multiple objects in ODst of redirecting nat rule". This fixes SF
bug 3162862 "NAT - more than one object in original destination"
* newFirewallDialog_from_template.cpp (replaceReferencesToNetworks):
fixes #1979 "New firewall created with Cisco c36xx template
results in network object in interface column in Policy"

View File

@ -373,15 +373,6 @@ bool NATCompiler_pf::VerifyRules::processNext()
return true;
}
if (rule->getRuleType()==NATRule::DNAT && odst->size()!=1)
{
compiler->abort(
rule,
"There should be no more than one object in original destination");
return true;
}
if (osrv->getNeg())
{
compiler->abort(

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:23 2011 PST by vadim
# Generated Thu Feb 10 11:23:08 2011 PST by vadim
#
# files: * firewall-base-rulesets.fw /etc/fw/firewall-base-rulesets.fw
# files: firewall-base-rulesets.conf /etc/fw/firewall-base-rulesets.conf
@ -163,7 +163,7 @@ configure_interfaces() {
update_addresses_of_interface "en2 192.168.100.1/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:23 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:08 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:23 2011 PST by vadim
# Generated Thu Feb 10 11:23:08 2011 PST by vadim
#
# files: * firewall-ipv6-1.fw pf-ipv6.fw
# files: firewall-ipv6-1.conf /etc/fw/pf-ipv6.conf
@ -175,7 +175,7 @@ configure_interfaces() {
update_addresses_of_interface "lo ::1/128 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:23 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:08 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:24 2011 PST by vadim
# Generated Thu Feb 10 11:23:09 2011 PST by vadim
#
# files: * firewall-ipv6-2.fw pf.fw
# files: firewall-ipv6-2.conf pf.conf
@ -179,7 +179,7 @@ configure_interfaces() {
update_addresses_of_interface "lo ::1/128 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:24 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:09 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -1,9 +1,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:24 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * firewall-ipv6-3.fw /etc/firewall-ipv6-3.fw
# files: firewall-ipv6-3.conf /etc/firewall-ipv6-3.conf

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:52 2011 PST by vadim
# Generated Thu Feb 10 11:22:37 2011 PST by vadim
#
# files: * firewall.fw /etc/pf.fw
# files: firewall.conf /etc/pf.conf
@ -167,7 +167,7 @@ configure_interfaces() {
update_addresses_of_interface "lo 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:52 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:37 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -26,9 +26,6 @@ table <tbl.r16> { 33.33.33.0/24 , 33.33.44.0/24 }
table <tbl.r7> { 192.168.1.0/24 , 192.168.2.0/24 }
table <tbl.r9> { 22.22.22.22 , 22.22.23.23 , 192.168.1.1 , 192.168.2.1 }
# NAT compiler errors and warnings:
# firewall1:NAT:13: error: There should be no more than one object in original destination
# firewall1:NAT:13: error: There should be no more than one object in original destination
#
# Rule 0 (NAT)
no nat proto {tcp udp icmp} from 192.168.1.0/24 to 192.168.2.0/24
@ -88,6 +85,10 @@ rdr proto tcp from <tbl.r11> to ! <tbl.r7> port 80 -> 127.0.0.1 port 3128
rdr proto tcp from 192.168.1.0/24 to ! <tbl.r7> port 80 -> 127.0.0.1 port 3128
rdr proto tcp from 192.168.1.0/24 to ! <tbl.r7> port 81 -> 127.0.0.1 port 3128
#
# Rule 13 (NAT)
rdr proto tcp from 192.168.1.0/24 to ! <tbl.r7> port 80 -> 192.168.2.200 port 3128
rdr proto tcp from 192.168.1.0/24 to ! <tbl.r7> port 81 -> 192.168.2.200 port 3128
#
# Rule 14 (NAT)
rdr proto tcp from ! <tbl.r11> to <tbl.r7> port 80 -> 127.0.0.1 port 3128
#

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:53 2011 PST by vadim
# Generated Thu Feb 10 11:22:38 2011 PST by vadim
#
# files: * firewall1.fw /etc/fw/firewall1.fw
# files: firewall1.conf /etc/fw/firewall1.conf
@ -15,9 +15,6 @@
# Also using interface policy on eth1 to test specific case with negation and
# rule shading depection
# firewall1:NAT:13: error: There should be no more than one object in original destination
# firewall1:NAT:13: error: There should be no more than one object in original destination
# firewall1:Policy:10: warning: Changing rule direction due to self reference
# firewall1:Policy:18: warning: Changing rule direction due to self reference
@ -79,7 +76,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:10:53 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:38 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:54 2011 PST by vadim
# Generated Thu Feb 10 11:22:39 2011 PST by vadim
#
# files: * firewall10-1.fw /etc/fw/firewall10-1.fw
# files: firewall10-1.conf /etc/fw/firewall10-1.conf
@ -74,7 +74,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:10:54 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:39 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:55 2011 PST by vadim
# Generated Thu Feb 10 11:22:40 2011 PST by vadim
#
# files: * firewall10-2.fw /etc/fw/firewall10-2.fw
# files: firewall10-2.conf /etc/fw/firewall10-2.conf
@ -74,7 +74,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:10:55 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:40 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:56 2011 PST by vadim
# Generated Thu Feb 10 11:22:42 2011 PST by vadim
#
# files: * firewall10-3.fw /etc/fw/firewall10-3.fw
# files: firewall10-3.conf /etc/fw/firewall10-3.conf
@ -76,7 +76,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:10:56 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:42 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:59 2011 PST by vadim
# Generated Thu Feb 10 11:22:44 2011 PST by vadim
#
# files: * firewall10-4.fw /etc/fw/firewall10-4.fw
# files: firewall10-4.conf /etc/fw/firewall10-4.conf
@ -76,7 +76,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:10:59 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:44 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:00 2011 PST by vadim
# Generated Thu Feb 10 11:22:46 2011 PST by vadim
#
# files: * firewall10-5.fw /etc/fw/firewall10-5.fw
# files: firewall10-5.conf /etc/fw/firewall10-5.conf
@ -77,7 +77,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:00 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:46 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:01 2011 PST by vadim
# Generated Thu Feb 10 11:22:47 2011 PST by vadim
#
# files: * firewall10-6.fw /etc/fw/firewall10-6.fw
# files: firewall10-6.conf /etc/fw/firewall10-6.conf
@ -77,7 +77,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:01 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:47 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:53 2011 PST by vadim
# Generated Thu Feb 10 11:22:38 2011 PST by vadim
#
# files: * firewall100.fw /etc/fw/pf.fw
# files: firewall100.conf /etc/fw/path\ with\ space/pf.conf
@ -160,7 +160,7 @@ configure_interfaces() {
update_addresses_of_interface "em1 10.1.1.81/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:53 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:38 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:54 2011 PST by vadim
# Generated Thu Feb 10 11:22:39 2011 PST by vadim
#
# files: * firewall101.fw /etc/fw/pf.fw
# files: firewall101.conf /etc/fw/path\ with\ space/pf.conf
@ -163,7 +163,7 @@ configure_interfaces() {
update_addresses_of_interface "em1 10.1.1.81/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:54 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:39 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -1,9 +1,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:55 2011 PST by vadim
# Generated Thu Feb 10 11:22:40 2011 PST by vadim
#
# files: * firewall102.fw /etc/fw/pf.fw
# files: firewall102.conf /etc/fw/path\ with\ space/pf.conf

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:57 2011 PST by vadim
# Generated Thu Feb 10 11:22:42 2011 PST by vadim
#
# files: * firewall103-1.fw /etc/fw/pf.fw
# files: firewall103-1.conf /etc/fw/path\ with\ space/pf.conf
@ -141,13 +141,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -166,7 +166,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -181,7 +181,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -195,13 +195,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -382,7 +382,7 @@ configure_interfaces() {
update_addresses_of_interface "em3" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:57 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:42 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:57 2011 PST by vadim
# Generated Thu Feb 10 11:22:43 2011 PST by vadim
#
# files: * firewall103-2.fw /etc/fw/pf.fw
# files: firewall103-2.conf /etc/fw/path\ with\ space/pf.conf
@ -141,13 +141,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -166,7 +166,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -181,7 +181,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -195,13 +195,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -382,7 +382,7 @@ configure_interfaces() {
update_addresses_of_interface "em3" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:57 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:43 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:56 2011 PST by vadim
# Generated Thu Feb 10 11:22:41 2011 PST by vadim
#
# files: * firewall103.fw /etc/fw/pf.fw
# files: firewall103.conf /etc/fw/path\ with\ space/pf.conf
@ -144,13 +144,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -169,7 +169,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -184,7 +184,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -198,13 +198,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -385,7 +385,7 @@ configure_interfaces() {
update_addresses_of_interface "em3" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:56 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:41 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:59 2011 PST by vadim
# Generated Thu Feb 10 11:22:45 2011 PST by vadim
#
# files: * firewall104-1.fw /etc/fw/pf.fw
# files: firewall104-1.conf /etc/fw/path\ with\ space/pf.conf
@ -141,13 +141,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -166,7 +166,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -181,7 +181,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -195,13 +195,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -381,7 +381,7 @@ configure_interfaces() {
update_addresses_of_interface "em3" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:59 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:45 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:10:58 2011 PST by vadim
# Generated Thu Feb 10 11:22:43 2011 PST by vadim
#
# files: * firewall104.fw /etc/fw/pf.fw
# files: firewall104.conf /etc/fw/path\ with\ space/pf.conf
@ -144,13 +144,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -169,7 +169,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -184,7 +184,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -198,13 +198,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -384,7 +384,7 @@ configure_interfaces() {
update_addresses_of_interface "em3" ""
}
log "Activating firewall script generated Tue Feb 8 14:10:58 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:43 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -1,9 +1,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:00 2011 PST by vadim
# Generated Thu Feb 10 11:22:45 2011 PST by vadim
#
# files: * firewall105.fw /etc/fw/pf.fw
# files: firewall105.conf /etc/fw/path\ with\ space/pf.conf

View File

@ -1,9 +1,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:01 2011 PST by vadim
# Generated Thu Feb 10 11:22:46 2011 PST by vadim
#
# files: * firewall106.fw /etc/fw/pf.fw
# files: firewall106.conf /etc/fw/path\ with\ space/pf.conf

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:02 2011 PST by vadim
# Generated Thu Feb 10 11:22:47 2011 PST by vadim
#
# files: * firewall107.fw /etc/fw/pf.fw
# files: firewall107.conf /etc/fw/path\ with\ space/pf.conf
@ -144,13 +144,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -169,7 +169,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -184,7 +184,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -198,13 +198,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -385,7 +385,7 @@ configure_interfaces() {
update_addresses_of_interface "vlan102 192.168.102.1/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:02 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:47 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -1,9 +1,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:03 2011 PST by vadim
# Generated Thu Feb 10 11:22:48 2011 PST by vadim
#
# files: * firewall108.fw /etc/fw/pf.fw
# files: firewall108.conf /etc/fw/path\ with\ space/pf.conf

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:03 2011 PST by vadim
# Generated Thu Feb 10 11:22:48 2011 PST by vadim
#
# files: * firewall11.fw /etc/firewall11.fw
# files: firewall11.conf /etc/firewall11.conf
@ -77,7 +77,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:03 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:48 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:04 2011 PST by vadim
# Generated Thu Feb 10 11:22:49 2011 PST by vadim
#
# files: * firewall12.fw /etc/fw/firewall12.fw
# files: firewall12.conf /etc/fw/firewall12.conf
@ -159,7 +159,7 @@ configure_interfaces() {
update_addresses_of_interface "lo0 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:04 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:49 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:04 2011 PST by vadim
# Generated Thu Feb 10 11:22:50 2011 PST by vadim
#
# files: * firewall13.fw /etc/fw/firewall13.fw
# files: firewall13.conf /etc/fw/firewall13.conf
@ -88,7 +88,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:04 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:50 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:05 2011 PST by vadim
# Generated Thu Feb 10 11:22:51 2011 PST by vadim
#
# files: * firewall14-1.fw /etc/firewall14-1.fw
# files: firewall14-1.conf /etc/firewall14-1.conf
@ -141,13 +141,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -166,7 +166,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -181,7 +181,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -195,13 +195,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -241,7 +241,7 @@ configure_interfaces() {
update_addresses_of_interface "vlan103 10.100.103.1/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:05 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:51 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:05 2011 PST by vadim
# Generated Thu Feb 10 11:22:50 2011 PST by vadim
#
# files: * firewall14.fw /etc/firewall14.fw
# files: firewall14.conf /etc/firewall14.conf
@ -141,13 +141,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -166,7 +166,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -181,7 +181,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -195,13 +195,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -241,7 +241,7 @@ configure_interfaces() {
update_addresses_of_interface "vlan103 10.100.103.1/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:05 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:50 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -22,11 +22,11 @@ scrub in all fragment reassemble no-df
scrub out all random-id min-ttl 32 max-mss 1460
# Tables: (1)
# Tables: (2)
table <tbl.r0> { 22.22.22.22 , 192.168.1.1 }
table <tbl.r9998.d> { 22.22.22.22 , 192.168.1.1 , 192.168.2.1 }
# NAT compiler errors and warnings:
# firewall2-1:NAT:0: error: There should be no more than one object in original destination
# firewall2-1:NAT:1: error: Negation in original service is not supported.
# firewall2-1:NAT:2: error: Can not translate 'any' into a specific service.
# firewall2-1:NAT:3: error: Can not use negation in translated source.
@ -42,6 +42,9 @@ table <tbl.r9998.d> { 22.22.22.22 , 192.168.1.1 , 192.168.2.1 }
# firewall2-1:NAT:16: error: Action 'Branch' needs NAT rule set to point to
# firewall2-1:NAT:17: warning: Translated Src, Dst and Srv are ignored in the NAT rule with action 'Branch'
#
# Rule 0 (NAT)
rdr on eth1 proto {tcp udp icmp} from any to <tbl.r0> -> 192.168.1.10
#
# Rule 8 (NAT)
no nat proto tcp from 192.168.1.0/24 to any
no rdr proto tcp from 192.168.1.0/24 to any

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:08 2011 PST by vadim
# Generated Thu Feb 10 11:22:53 2011 PST by vadim
#
# files: * firewall2-1.fw /etc/fw/firewall2-1.fw
# files: firewall2-1.conf /etc/fw/firewall2-1.conf
@ -15,7 +15,6 @@
# firewall2-1:NAT:17: warning: Rule set NAT of firewall firewall2-1 has branching rule that loops back to it
# firewall2-1:NAT:0: error: There should be no more than one object in original destination
# firewall2-1:NAT:1: error: Negation in original service is not supported.
# firewall2-1:NAT:2: error: Can not translate 'any' into a specific service.
# firewall2-1:NAT:3: error: Can not use negation in translated source.
@ -89,7 +88,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:08 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:53 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -22,9 +22,10 @@ scrub in all fragment reassemble no-df
scrub out all random-id min-ttl 32 max-mss 1460
# Tables: (3)
# Tables: (4)
table <tbl.r1> { 192.168.1.10 , 192.168.1.20 }
table <tbl.r16> { 22.22.22.22 , 22.22.23.23 , 192.168.1.1 , 192.168.2.1 }
table <tbl.r29> { 192.168.1.0/24 , 192.168.2.0/24 }
table <tbl.r5.s> { 22.22.22.22 , 22.22.23.23 , 192.168.1.0/24 , 192.168.1.1 , 192.168.2.1 }
#
@ -115,19 +116,31 @@ rdr proto tcp from 192.168.1.0/24 to any port 80 -> 192.168.1.1 port 80
rdr proto tcp from any to <tbl.r16> port 1080 -> 127.0.0.1 port 80
#
# Rule 28 (NAT)
# SF bug 3162862
rdr proto tcp from 192.168.1.0/24 to ! 192.168.1.0/24 port 80 -> 192.168.1.10 port 10000:*
#
# Rule 29 (NAT)
# SF bug 3162862
rdr proto tcp from 192.168.1.0/24 to ! <tbl.r29> port 80 -> 192.168.1.10 port 10000:*
#
# Rule 30 (NAT)
# SF bug 3162862
rdr proto tcp from 192.168.1.0/24 to ! <tbl.r29> port 80 -> 127.0.0.1 port 10000:*
#
# Rule 31 (NAT)
# for bug 1111267: this custom service object has
# "proto ..." in the protocol string, compiler can put
# it in generated nat command in the right place.
nat on eth1 proto {tcp udp icmp gre} from 192.168.1.0/24 to any -> 22.22.22.22
#
# Rule 29 (NAT)
# Rule 32 (NAT)
# for bug 1111267: this custom service object
# has "proto .." in the code string but we can't insert
# it in the generated nat command b/c it would appear
# in the wrong place, after "from".
nat on eth1 from 192.168.1.0/24 to any -> 22.22.22.22
#
# Rule 30 (NAT)
# Rule 33 (NAT)
nat on eth1 proto 47 from 192.168.1.0/24 to any -> 22.22.22.22
nat on eth1 proto icmp from 192.168.1.0/24 to any -> 22.22.22.22
nat on eth1 proto tcp from 192.168.1.0/24 to any -> 22.22.22.22

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:06 2011 PST by vadim
# Generated Thu Feb 10 11:22:51 2011 PST by vadim
#
# files: * firewall2.fw /etc/fw/firewall2.fw
# files: firewall2.conf /etc/fw/firewall2.conf
@ -73,7 +73,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:06 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:51 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:07 2011 PST by vadim
# Generated Thu Feb 10 11:22:52 2011 PST by vadim
#
# files: * firewall20.fw /etc/fw/firewall20.fw
# files: firewall20.conf /etc/fw/firewall20.conf
@ -73,7 +73,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:07 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:52 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:07 2011 PST by vadim
# Generated Thu Feb 10 11:22:53 2011 PST by vadim
#
# files: * firewall21.fw /etc/fw/firewall21.fw
# files: firewall21.conf /etc/fw/firewall21.conf
@ -81,7 +81,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:07 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:53 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:09 2011 PST by vadim
# Generated Thu Feb 10 11:22:54 2011 PST by vadim
#
# files: * firewall22.fw /etc/fw/firewall22.fw
# files: firewall22.conf /etc/fw/firewall22.conf
@ -80,7 +80,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:09 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:54 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:09 2011 PST by vadim
# Generated Thu Feb 10 11:22:54 2011 PST by vadim
#
# files: * firewall3.fw /etc/firewall3.fw
# files: firewall3.conf /etc/firewall3.conf
@ -159,7 +159,7 @@ configure_interfaces() {
update_addresses_of_interface "lo 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:09 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:54 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:10 2011 PST by vadim
# Generated Thu Feb 10 11:22:55 2011 PST by vadim
#
# files: * firewall33.fw /etc/fw/firewall33.fw
# files: firewall33.conf /etc/fw/firewall33.conf
@ -162,7 +162,7 @@ configure_interfaces() {
update_addresses_of_interface "lo 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:10 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:55 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:10 2011 PST by vadim
# Generated Thu Feb 10 11:22:55 2011 PST by vadim
#
# files: * firewall34.fw /etc/fw/firewall34.fw
# files: firewall34.conf /etc/fw/firewall34.conf
@ -158,7 +158,7 @@ configure_interfaces() {
update_addresses_of_interface "lo 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:10 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:55 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:11 2011 PST by vadim
# Generated Thu Feb 10 11:22:56 2011 PST by vadim
#
# files: * firewall38.fw /etc/fw/firewall38.fw
# files: firewall38.conf /etc/fw/firewall38.conf
@ -76,7 +76,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:11 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:56 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:12 2011 PST by vadim
# Generated Thu Feb 10 11:22:57 2011 PST by vadim
#
# files: * firewall39.fw pf.fw
# files: firewall39.conf pf.conf
@ -79,7 +79,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:12 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:57 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:12 2011 PST by vadim
# Generated Thu Feb 10 11:22:58 2011 PST by vadim
#
# files: * firewall4.fw pf.fw
# files: firewall4.conf /etc/fw/pf.conf
@ -77,7 +77,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:12 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:58 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:14 2011 PST by vadim
# Generated Thu Feb 10 11:22:59 2011 PST by vadim
#
# files: * firewall40-1.fw /etc/firewall40-1.fw
# files: firewall40-1.conf /etc/firewall40-1.conf
@ -176,7 +176,7 @@ configure_interfaces() {
update_addresses_of_interface "lo0 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:14 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:59 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:13 2011 PST by vadim
# Generated Thu Feb 10 11:22:58 2011 PST by vadim
#
# files: * firewall40.fw /etc/firewall40.fw
# files: firewall40.conf /etc/firewall40.conf
@ -160,7 +160,7 @@ configure_interfaces() {
update_addresses_of_interface "lo0 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:13 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:58 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:14 2011 PST by vadim
# Generated Thu Feb 10 11:22:59 2011 PST by vadim
#
# files: * firewall41.fw /etc/firewall41.fw
# files: firewall41.conf /etc/firewall41.conf
@ -163,7 +163,7 @@ configure_interfaces() {
update_addresses_of_interface "eth1 2.2.2.2/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:14 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:22:59 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:15 2011 PST by vadim
# Generated Thu Feb 10 11:23:00 2011 PST by vadim
#
# files: * firewall5.fw /etc/fw/firewall5.fw
# files: firewall5.conf /etc/fw/firewall5.conf
@ -77,7 +77,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:15 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:00 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:16 2011 PST by vadim
# Generated Thu Feb 10 11:23:01 2011 PST by vadim
#
# files: * firewall51.fw /etc/fw/firewall51.fw
# files: firewall51.conf /etc/fw/firewall51.conf
@ -80,7 +80,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:16 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:01 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:16 2011 PST by vadim
# Generated Thu Feb 10 11:23:01 2011 PST by vadim
#
# files: * firewall6.fw /etc/fw/firewall6.fw
# files: firewall6.conf /etc/fw/firewall6.conf
@ -73,7 +73,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:16 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:01 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:17 2011 PST by vadim
# Generated Thu Feb 10 11:23:02 2011 PST by vadim
#
# files: * firewall62.fw /etc/firewall62.fw
# files: firewall62.conf /etc/firewall62.conf
@ -185,7 +185,7 @@ configure_interfaces() {
update_addresses_of_interface "en1 222.222.222.222/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:17 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:02 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:17 2011 PST by vadim
# Generated Thu Feb 10 11:23:02 2011 PST by vadim
#
# files: * firewall63.fw /etc/fw/firewall63.fw
# files: firewall63.conf /etc/fw/firewall63.conf
@ -77,7 +77,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:17 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:02 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:18 2011 PST by vadim
# Generated Thu Feb 10 11:23:03 2011 PST by vadim
#
# files: * firewall7.fw /etc/fw/firewall7.fw
# files: firewall7.conf /etc/fw/firewall7.conf
@ -73,7 +73,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:18 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:03 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:18 2011 PST by vadim
# Generated Thu Feb 10 11:23:04 2011 PST by vadim
#
# files: * firewall70.fw /etc/fw/firewall70.fw
# files: firewall70.conf /etc/fw/firewall70.conf
@ -82,7 +82,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:18 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:04 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:19 2011 PST by vadim
# Generated Thu Feb 10 11:23:04 2011 PST by vadim
#
# files: * firewall8.fw /etc/firewall8.fw
# files: firewall8.conf /etc/firewall8.conf
@ -72,7 +72,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:19 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:04 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:20 2011 PST by vadim
# Generated Thu Feb 10 11:23:05 2011 PST by vadim
#
# files: * firewall80-4.5.fw /etc/firewall80-4.5.fw
# files: firewall80-4.5.conf /etc/firewall80-4.5.conf
@ -73,7 +73,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:20 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:05 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:20 2011 PST by vadim
# Generated Thu Feb 10 11:23:05 2011 PST by vadim
#
# files: * firewall80.fw /etc/firewall80.fw
# files: firewall80.conf /etc/firewall80.conf
@ -73,7 +73,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:20 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:05 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:21 2011 PST by vadim
# Generated Thu Feb 10 11:23:06 2011 PST by vadim
#
# files: * firewall9.fw /etc/fw/firewall9.fw
# files: firewall9.conf /etc/fw/firewall9.conf
@ -76,7 +76,7 @@ configure_interfaces() {
}
log "Activating firewall script generated Tue Feb 8 14:11:21 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:06 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:21 2011 PST by vadim
# Generated Thu Feb 10 11:23:07 2011 PST by vadim
#
# files: * firewall91.fw /etc/fw/pf.fw
# files: firewall91.conf /etc/fw/pf.conf
@ -140,13 +140,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -165,7 +165,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -180,7 +180,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -194,13 +194,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -240,7 +240,7 @@ configure_interfaces() {
update_addresses_of_interface "vlan103 10.100.103.1/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:21 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:07 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:22 2011 PST by vadim
# Generated Thu Feb 10 11:23:07 2011 PST by vadim
#
# files: * firewall92.fw /etc/fw/pf.fw
# files: firewall92.conf /etc/fw/path\ with\ space/pf.conf
@ -160,7 +160,7 @@ configure_interfaces() {
update_addresses_of_interface "em1 10.1.1.81/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:22 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:07 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -4089,7 +4089,7 @@
<Option name="use_tables">True</Option>
</FirewallOptions>
</Firewall>
<Firewall id="id3AFB66C6" host_OS="openbsd" inactive="False" lastCompiled="1261961536" lastInstalled="0" lastModified="1261961503" platform="pf" version="" name="firewall2" comment="this object has several interfaces and shows different rules for NAT. Also testing policy rule options " ro="False">
<Firewall id="id3AFB66C6" host_OS="openbsd" inactive="False" lastCompiled="1261961536" lastInstalled="0" lastModified="1297365393" platform="pf" version="" name="firewall2" comment="this object has several interfaces and shows different rules for NAT. Also testing policy rule options " ro="False">
<NAT id="id3AFB66C7" name="NAT" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True">
<NATRule id="id3AFB66C8" disabled="False" group="" position="0" action="Translate" comment="">
<OSrc neg="False">
@ -4712,7 +4712,72 @@
</TSrv>
<NATRuleOptions/>
</NATRule>
<NATRule id="id41F9FFBB" disabled="False" group="" position="28" action="Translate" comment="for bug 1111267: this custom service object has&#10;&quot;proto ...&quot; in the protocol string, compiler can put&#10;it in generated nat command in the right place.">
<NATRule id="id294558X26175" disabled="False" group="" position="28" action="Translate" comment="SF bug 3162862">
<OSrc neg="False">
<ObjectRef ref="net-Internal_net"/>
</OSrc>
<ODst neg="True">
<ObjectRef ref="net-Internal_net"/>
</ODst>
<OSrv neg="False">
<ServiceRef ref="tcp-HTTP"/>
</OSrv>
<TSrc neg="False">
<ObjectRef ref="sysid0"/>
</TSrc>
<TDst neg="False">
<ObjectRef ref="host-hostA"/>
</TDst>
<TSrv neg="False">
<ServiceRef ref="id3B20468D"/>
</TSrv>
<NATRuleOptions/>
</NATRule>
<NATRule id="id424735X26175" disabled="False" group="" position="29" action="Translate" comment="SF bug 3162862">
<OSrc neg="False">
<ObjectRef ref="net-Internal_net"/>
</OSrc>
<ODst neg="True">
<ObjectRef ref="id3CEBFDFC"/>
<ObjectRef ref="id4733FFE419714"/>
</ODst>
<OSrv neg="False">
<ServiceRef ref="tcp-HTTP"/>
</OSrv>
<TSrc neg="False">
<ObjectRef ref="sysid0"/>
</TSrc>
<TDst neg="False">
<ObjectRef ref="host-hostA"/>
</TDst>
<TSrv neg="False">
<ServiceRef ref="id3B20468D"/>
</TSrv>
<NATRuleOptions/>
</NATRule>
<NATRule id="id511857X26175" disabled="False" group="" position="30" action="Translate" comment="SF bug 3162862">
<OSrc neg="False">
<ObjectRef ref="net-Internal_net"/>
</OSrc>
<ODst neg="True">
<ObjectRef ref="id3CEBFDFC"/>
<ObjectRef ref="id4733FFE419714"/>
</ODst>
<OSrv neg="False">
<ServiceRef ref="tcp-HTTP"/>
</OSrv>
<TSrc neg="False">
<ObjectRef ref="sysid0"/>
</TSrc>
<TDst neg="False">
<ObjectRef ref="id3AFB66C6"/>
</TDst>
<TSrv neg="False">
<ServiceRef ref="id3B20468D"/>
</TSrv>
<NATRuleOptions/>
</NATRule>
<NATRule id="id41F9FFBB" disabled="False" group="" position="31" action="Translate" comment="for bug 1111267: this custom service object has&#10;&quot;proto ...&quot; in the protocol string, compiler can put&#10;it in generated nat command in the right place.">
<OSrc neg="False">
<ObjectRef ref="net-Internal_net"/>
</OSrc>
@ -4733,7 +4798,7 @@
</TSrv>
<NATRuleOptions/>
</NATRule>
<NATRule id="id15833X50242" disabled="False" group="" position="29" action="Translate" comment="for bug 1111267: this custom service object&#10;has &quot;proto ..&quot; in the code string but we can't insert&#10;it in the generated nat command b/c it would appear &#10;in the wrong place, after &quot;from&quot;.&#10;">
<NATRule id="id15833X50242" disabled="False" group="" position="32" action="Translate" comment="for bug 1111267: this custom service object&#10;has &quot;proto ..&quot; in the code string but we can't insert&#10;it in the generated nat command b/c it would appear &#10;in the wrong place, after &quot;from&quot;.&#10;">
<OSrc neg="False">
<ObjectRef ref="net-Internal_net"/>
</OSrc>
@ -4754,7 +4819,7 @@
</TSrv>
<NATRuleOptions/>
</NATRule>
<NATRule id="id41FA0A82" disabled="False" group="" position="30" action="Translate" comment="">
<NATRule id="id41FA0A82" disabled="False" group="" position="33" action="Translate" comment="">
<OSrc neg="False">
<ObjectRef ref="net-Internal_net"/>
</OSrc>

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:24 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * pf_cluster_1_openbsd-1.fw /etc/pf_cluster_1_openbsd-1.fw
# files: pf_cluster_1_openbsd-1.conf /etc/pf_cluster_1_openbsd-1.conf
@ -140,13 +140,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -165,7 +165,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -180,7 +180,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -194,13 +194,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -289,7 +289,7 @@ configure_interfaces() {
update_addresses_of_interface "lo0 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:24 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:10 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:24 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * pf_cluster_1_openbsd-2.fw /etc/pf_cluster_1_openbsd-2.fw
# files: pf_cluster_1_openbsd-2.conf /etc/pf_cluster_1_openbsd-2.conf
@ -186,7 +186,7 @@ configure_interfaces() {
update_addresses_of_interface "lo0 127.0.0.1/0xff000000" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:24 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:10 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:25 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * pf_cluster_2_freebsd-1.fw /etc/pf_cluster_2_freebsd-1.fw
# files: pf_cluster_2_freebsd-1.conf /etc/pf_cluster_2_freebsd-1.conf
@ -143,13 +143,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -168,7 +168,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -183,7 +183,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -197,13 +197,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -291,7 +291,7 @@ configure_interfaces() {
update_addresses_of_interface "en1 192.168.1.2/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:25 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:10 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:25 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * pf_cluster_2_freebsd-2.fw /etc/pf_cluster_2_freebsd-2.fw
# files: pf_cluster_2_freebsd-2.conf /etc/pf_cluster_2_freebsd-2.conf
@ -188,7 +188,7 @@ configure_interfaces() {
update_addresses_of_interface "en1 192.168.1.3/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:25 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:10 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:25 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * pf_cluster_3_openbsd-3.fw /etc/pf_cluster_3_openbsd-3.fw
# files: pf_cluster_3_openbsd-3.conf /etc/pf_cluster_3_openbsd-3.conf
@ -140,13 +140,13 @@ missing_vlan() {
vlan_id=$(echo $subint | sed 's/vlan//')
test "$cmd" = "add" && {
echo "# Adding VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent
$FWBDEBUG $IFCONFIG $subint up
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id vlandev $parent || exit 1
$FWBDEBUG $IFCONFIG $subint up || exit 1
}
test "$cmd" = "rem" && {
echo "# Removing VLAN interface $subint (parent: $parent)"
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev
$FWBDEBUG $IFCONFIG $subint destroy
$FWBDEBUG $IFCONFIG $subint vlan $vlan_id -vlandev || exit 1
$FWBDEBUG $IFCONFIG $subint destroy || exit 1
}
}
@ -165,7 +165,7 @@ parse_fwb_vlans() {
parse_current_vlans() {
vlan_parent_interface=$1
$IFCONFIG -A | grep 'vlan: ' | sed 's/priority:.*parent interface://' | \
$IFCONFIG -A | grep 'vlan: ' | sed 's/parent interface://' | \
while read x vlan_id parent
do
test "$parent" = "$vlan_parent_interface" && echo "vlan$vlan_id@$parent"
@ -180,7 +180,7 @@ update_vlans_of_interface() {
FWB_VLANS=$(parse_fwb_vlans "$args")
CURRENT_VLANS=$(parse_current_vlans $vlan_parent_interface)
$IFCONFIG $vlan_parent_interface up
$IFCONFIG $vlan_parent_interface up || exit 1
diff_intf missing_vlan "$FWB_VLANS" "$CURRENT_VLANS" add
diff_intf missing_vlan "$CURRENT_VLANS" "$FWB_VLANS" rem
}
@ -194,13 +194,13 @@ sync_vlan_interfaces() {
($1 ~ /^vlan[0-9]/ && !($1 in ignored_dict)) {print $1;}' | sed 's/://' |\
while read intf; do
echo "# Deleting vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf destroy
$FWBDEBUG $IFCONFIG $intf destroy || exit 1
done
for intf in $*; do
$IFCONFIG $intf >/dev/null 2>&1 || {
echo "# Creating vlan interface $intf"
$FWBDEBUG $IFCONFIG $intf create
$FWBDEBUG $IFCONFIG $intf create || exit 1
}
done
}
@ -278,9 +278,9 @@ configure_interfaces() {
sync_vlan_interfaces vlan100
update_vlans_of_interface "en2 vlan100"
sync_carp_interfaces carp0 carp1 carp2
$IFCONFIG carp0 vhid pass "" carpdev en0
$IFCONFIG carp1 vhid pass "" carpdev en1
$IFCONFIG carp2 vhid pass "" carpdev vlan100
$IFCONFIG carp0 vhid 1 pass "" carpdev en0
$IFCONFIG carp1 vhid 1 pass "" carpdev en1
$IFCONFIG carp2 vhid 1 pass "" carpdev vlan100
sync_pfsync_interfaces
update_addresses_of_interface "carp0 172.24.0.1/0xffffff00" ""
update_addresses_of_interface "carp1 192.168.1.1/0xffffff00" ""
@ -292,7 +292,7 @@ configure_interfaces() {
update_addresses_of_interface "vlan100 172.20.0.2/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:25 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:10 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -2,9 +2,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:25 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * pf_cluster_3_openbsd-4.fw /etc/pf_cluster_3_openbsd-4.fw
# files: pf_cluster_3_openbsd-4.conf /etc/pf_cluster_3_openbsd-4.conf
@ -177,9 +177,9 @@ run_epilog_and_exit() {
configure_interfaces() {
:
sync_carp_interfaces carp0 carp1 carp2
$IFCONFIG carp0 vhid pass "" advskew 1 carpdev en0
$IFCONFIG carp1 vhid pass "" advskew 1 carpdev en1
$IFCONFIG carp2 vhid pass "" advskew 1 carpdev vlan100
$IFCONFIG carp0 vhid 1 pass "" advskew 1 carpdev en0
$IFCONFIG carp1 vhid 1 pass "" advskew 1 carpdev en1
$IFCONFIG carp2 vhid 1 pass "" advskew 1 carpdev vlan100
update_addresses_of_interface "carp0 172.24.0.1/0xffffff00" ""
update_addresses_of_interface "carp1 192.168.1.1/0xffffff00" ""
update_addresses_of_interface "carp2 172.20.0.1/0xffffff00" ""
@ -190,7 +190,7 @@ configure_interfaces() {
update_addresses_of_interface "vlan100 172.20.0.3/0xffffff00" ""
}
log "Activating firewall script generated Tue Feb 8 14:11:25 2011 by vadim"
log "Activating firewall script generated Thu Feb 10 11:23:10 2011 by vadim"
set_kernel_vars
configure_interfaces

View File

@ -1,9 +1,9 @@
#
# This is automatically generated file. DO NOT MODIFY !
#
# Firewall Builder fwb_pf v4.2.0.3465
# Firewall Builder fwb_pf v4.2.0.3469
#
# Generated Tue Feb 8 14:11:25 2011 PST by vadim
# Generated Thu Feb 10 11:23:10 2011 PST by vadim
#
# files: * pf_cluster_4_rc.conf.local /etc/pf_cluster_4_rc.conf.local
# files: pf_cluster_4_pf.conf /etc/pf_cluster_4_pf.conf