Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, March 28, 2024

Diff for scripts/shell/firewall/fw-universal.sh between version 2.42 and 2.47

version 2.42, 2006/03/12 22:23:40 version 2.47, 2006/09/24 16:17:10
Line 110  load_cache()
Line 110  load_cache()
                 mkdir -p "$DEFAULT_CACHE_DIR";                  mkdir -p "$DEFAULT_CACHE_DIR";
         fi          fi
   
         config=`cat $DEFAULT_FIREWALL_CONFIG`;          config=`cat $DEFAULT_FIREWALL_CONFIG $0`; # config file and firewalling script
         md5key=`echo "config = '$config' parsed_interfaces ='$parsed_interfaces' parsed_routes='$parsed_routes'" | md5sum | $AWK '{ print $1; }'`;          md5key=`echo "config = '$config' parsed_interfaces ='$parsed_interfaces' parsed_routes='$parsed_routes'" | md5sum | $AWK '{ print $1; }'`;
         CACHE_FILE="$DEFAULT_CACHE_DIR/$md5key"          CACHE_FILE="$DEFAULT_CACHE_DIR/$md5key"
   
Line 537  allow_input()
Line 537  allow_input()
                         $IPTABLES -A INPUT -s $client_ip -i $NAT_SUBNET_IFACE -j DROP                          $IPTABLES -A INPUT -s $client_ip -i $NAT_SUBNET_IFACE -j DROP
                 done                  done
         fi          fi
           if [ ! -z "$ALL_DROP_INPUT_TCP" ]; then
                   echo -en "Drop ALL INPUT TCP connections on ports:"
                   for port in $ALL_DROP_INPUT_TCP; do
                           for iface in $INTERFACES; do
                                   echo -en " $port($iface)"
                                   IPS="IP_$iface";
                                   for ip in ${!IPS}; do
                                           $IPTABLES -A INPUT -i $iface -d $ip -p TCP --dport $port -j DROP
                                   done
                           done
                   done
                   echo " done."
           fi
           if [ ! -z "$ALL_DROP_INPUT_UDP" ]; then
                   echo -en "Drop ALL INPUT UDP connections on ports:"
                   for port in $ALL_DROP_INPUT_UDP; do
                           for iface in $INTERFACES; do
                                   echo -en " $port($iface)"
                                   IPS="IP_$iface";
                                   for ip in ${!IPS}; do
                                           $IPTABLES -A INPUT -i $iface -d $ip -p UDP --dport $port -j DROP
                                   done
                           done
                   done
                   echo " done."
           fi
         if [ ! -z "$ALL_ACCEPT_INPUT_TCP" ]; then          if [ ! -z "$ALL_ACCEPT_INPUT_TCP" ]; then
                 echo -en "Accepting ALL INPUT TCP connections on ports:"                  echo -en "Accepting ALL INPUT TCP connections on ports:"
                 for port in $ALL_ACCEPT_INPUT_TCP; do                  for port in $ALL_ACCEPT_INPUT_TCP; do
Line 723  log_forward_drop()
Line 749  log_forward_drop()
   
 } # }}}  } # }}}
   
   configure_special_rules()
   { # {{{
   
           echo -en "Loading special rules: "
           ##
           ## for DSL from Slovanet (Slovak DSL provider) and DSL modem DLINK DSL-360T you must add following rule for proper ssh connect to your machine
           ##
           # echo -en "slovanet "
           # $IPTABLES -t mangle -A OUTPUT -s 0/0 -j DSCP --set-dscp 0
   
           echo " done.";
   
   } # }}}
   
 do_ip_accounting()  do_ip_accounting()
 { # {{{  { # {{{
   
Line 955  case "$1" in
Line 995  case "$1" in
                 nmap_scan_filter                  nmap_scan_filter
                 invalid_packet_filter                  invalid_packet_filter
                 anti_spoof_filter                  anti_spoof_filter
                 syn_flood                  #syn_flood
                 mangle_prerouting                  mangle_prerouting
                 mangle_output                  mangle_output
                 accept_related                  accept_related
Line 971  case "$1" in
Line 1011  case "$1" in
                 log_forward_drop                  log_forward_drop
                 forward_on                  forward_on
                 do_ip_accounting                  do_ip_accounting
                   configure_special_rules
                 $IPTABLES_SAVE -c > $CACHE_FILE                  $IPTABLES_SAVE -c > $CACHE_FILE
                 ;;                  ;;
   

Legend:
Removed from v.2.42  
changed lines
  Added in v.2.47

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top