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

Diff for scripts/shell/firewall/fw-universal.sh between version 2.67 and 2.68

version 2.67, 2009/02/11 22:55:41 version 2.68, 2009/03/04 22:51:42
Line 9 
Line 9 
 # Licensed under terms of GNU General Public License.  # Licensed under terms of GNU General Public License.
 # All rights reserved.  # All rights reserved.
 #  #
 # $Platon: scripts/shell/firewall/fw-universal.sh,v 2.66 2009-02-06 23:13:38 rajo Exp $  # $Platon: scripts/shell/firewall/fw-universal.sh,v 2.67 2009-02-11 22:55:41 rajo Exp $
 #  #
 # Changelog:  # Changelog:
 # 2003-10-24 - created  # 2003-10-24 - created
Line 811  allow_input()
Line 811  allow_input()
                         for port in $ACCEPT_INPUT_TCP; do                          for port in $ACCEPT_INPUT_TCP; do
                                 src_ip=""                                  src_ip=""
                                 eval `echo $port | awk -v FS=: '/:/ { printf "src_ip=\"%s\"; port=\"%s\";", $1, $2; }'`                                  eval `echo $port | awk -v FS=: '/:/ { printf "src_ip=\"%s\"; port=\"%s\";", $1, $2; }'`
                                   if [ -n "$src_ip" -a "$port" = "0" ]; then
                                           port="ALL";
                                   fi
                                 print_info -en " $port"`[ ! -z $src_ip ] && echo "[$src_ip]"`                                  print_info -en " $port"`[ ! -z $src_ip ] && echo "[$src_ip]"`
                                 for ip in ${!IPS}; do                                  for ip in ${!IPS}; do
                                         if [ -z $src_ip ]; then                                          if [ -z $src_ip ]; then
                                                 $IPTABLES -A INPUT -i ${!riface} -d $ip -p TCP --dport $port -j ACCEPT                                                  $IPTABLES -A INPUT -i ${!riface} -d $ip -p TCP --dport $port -j ACCEPT
                                         else                                          else
                                                 $IPTABLES -A INPUT -i ${!riface} -s $src_ip -d $ip -p TCP --dport $port -j ACCEPT                                                  if [ "$port" = "ALL" ]; then
                                                           $IPTABLES -A INPUT -i ${!riface} -s $src_ip -d $ip -p TCP -j ACCEPT
                                                   else
                                                           $IPTABLES -A INPUT -i ${!riface} -s $src_ip -d $ip -p TCP --dport $port -j ACCEPT
                                                   fi
                                         fi                                          fi
                                 done                                  done
                         done                          done
Line 828  allow_input()
Line 835  allow_input()
                         for port in $ACCEPT_INPUT_UDP; do                          for port in $ACCEPT_INPUT_UDP; do
                                 src_ip=""                                  src_ip=""
                                 eval `echo $port | awk -v FS=: '/:/ { printf "src_ip=\"%s\"; port=\"%s\";", $1, $2; }'`                                  eval `echo $port | awk -v FS=: '/:/ { printf "src_ip=\"%s\"; port=\"%s\";", $1, $2; }'`
                                   if [ -n "$src_ip" -a "$port" = "0" ]; then
                                           port="ALL";
                                   fi
                                 print_info -en " $port"`[ ! -z $src_ip ] && echo "[$src_ip]"`                                  print_info -en " $port"`[ ! -z $src_ip ] && echo "[$src_ip]"`
                                 #$IPTABLES -A INPUT -i $iface -d ${!INET_IP} -p UDP --dport $port -j ACCEPT                                  #$IPTABLES -A INPUT -i $iface -d ${!INET_IP} -p UDP --dport $port -j ACCEPT
                                 #$IPTABLES -A INPUT -i $iface --source 192.168.1.0/16 -p UDP --dport $port -j ACCEPT                                  #$IPTABLES -A INPUT -i $iface --source 192.168.1.0/16 -p UDP --dport $port -j ACCEPT
Line 835  allow_input()
Line 845  allow_input()
                                         if [ -z $src_ip ]; then                                          if [ -z $src_ip ]; then
                                                 $IPTABLES -A INPUT -i ${!riface} -d $ip -p UDP --dport $port -j ACCEPT                                                  $IPTABLES -A INPUT -i ${!riface} -d $ip -p UDP --dport $port -j ACCEPT
                                         else                                          else
                                                 $IPTABLES -A INPUT -i ${!riface} -s $src_ip -d $ip -p UDP --dport $port -j ACCEPT                                                  if [ "$port" = "ALL" ]; then
                                                           $IPTABLES -A INPUT -i ${!riface} -s $src_ip -d $ip -p UDP -j ACCEPT
                                                   else
                                                           $IPTABLES -A INPUT -i ${!riface} -s $src_ip -d $ip -p UDP --dport $port -j ACCEPT
                                                   fi
                                         fi                                          fi
                                 done                                  done
                         done                          done

Legend:
Removed from v.2.67  
changed lines
  Added in v.2.68

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