#---------------------------------------------------------------------------- # /etc/rc.d/fwrules.pre050.portfw6 # # Last Update: $Id$ #---------------------------------------------------------------------------- pf6_fwd_portfw_default () { add_rule6 filter FORWARD 'state:NEW PORTFWACCESS' PF6_FORWARD_ACCEPT_DEF } if ip6tables -t nat -L >/dev/null 2>&1 then # # redirection chains # add_nat_chain6 PORTFW add_rule6 nat PREROUTING 'PORTFW' # # access chains # add_chain6 PORTFWACCESS add_chain6 PORTREDIRACCESS case $PF6_FORWARD_ACCEPT_DEF in yes) pf6_fwd_add_default pf6_fwd_portfw_default ;; no) [ 0$PF6_FORWARD_N -eq 0 ] || for idx in `seq 1 $PF6_FORWARD_N` do var=PF6_FORWARD_$idx eval rule=\$$var case "$rule" in pfwaccess-chain) eval $var="'state:NEW PORTFWACCESS'" break ;; esac done ;; esac pf6_in_portredir_default () { add_rule6 filter INPUT 'state:NEW PORTREDIRACCESS' PF6_INPUT_ACCEPT_DEF } case $PF6_INPUT_ACCEPT_DEF in yes) pf6_in_add_default pf6_in_portredir_default ;; no) [ 0$PF6_INPUT_N -eq 0 ] || for idx in `seq 1 $PF6_INPUT_N` do var=PF6_INPUT_$idx eval rule=\$$var case "$rule" in redir-access-chain) eval $var="'state:NEW PORTREDIRACCESS'" break ;; esac done ;; esac fi