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.100 and 2.101

version 2.100, 2013/09/28 10:07:18 version 2.101, 2013/09/28 18:51:30
Line 22 
Line 22 
 # 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.99 2013-09-28 09:25:35 nepto Exp $  # $Platon: scripts/shell/firewall/fw-universal.sh,v 2.100 2013-09-28 10:07:18 nepto Exp $
 #  #
 # Changelog:  # Changelog:
 # 2003-10-24 - created  # 2003-10-24 - created
Line 1213  allow_output()
Line 1213  allow_output()
         output_icmp_str="";          output_icmp_str="";
   
         for iface in $INTERFACES; do          for iface in $INTERFACES; do
                   gateway="Gateway_$iface";
                 riface="IFname_$iface";                  riface="IFname_$iface";
                 IPS="IP_$iface";                  IPS="IP_$iface";
   
Line 1224  allow_output()
Line 1225  allow_output()
   
                 # TCP                  # TCP
                 if [ -z "$ACCEPT_OUTPUT_TCP" ]; then                  if [ -z "$ACCEPT_OUTPUT_TCP" ]; then
                         for ip in ${!IPS}; do                          if [ -n "${!gateway}" ]; then
                                 output_tcp_str="$output_tcp_str $ip(${!riface})";                                  for ip in ${!IPS}; do
                                 $IPTABLES -A OUTPUT -p TCP -o ${!riface} -s $ip -j ACCEPT                                          output_tcp_str="$output_tcp_str $ip:${!riface}:${!gateway}";
                         done                                          $IPTABLES -A OUTPUT -p TCP -o ${!riface} -s $ip -j ACCEPT
                                   done
                           fi
                 else                  else
                         print_info -en "$iface: Accepting OUTPUT TCP connections to ports:"                          print_info -en "$iface: Accepting OUTPUT TCP connections to ports:"
                         for port in $ACCEPT_OUTPUT_TCP; do                          for port in $ACCEPT_OUTPUT_TCP; do
Line 1252  allow_output()
Line 1255  allow_output()
   
                 # UDP                  # UDP
                 if [ -z "$ACCEPT_OUTPUT_UDP" ]; then                  if [ -z "$ACCEPT_OUTPUT_UDP" ]; then
                         for ip in ${!IPS}; do                          if [ -n "${!gateway}" ]; then
                                 output_udp_str="$output_udp_str $ip(${!riface})";                                  for ip in ${!IPS}; do
                                 $IPTABLES -A OUTPUT -p UDP -o ${!riface} -s $ip -j ACCEPT                                          output_udp_str="$output_udp_str $ip:${!riface}:${!gateway}";
                         done                                          $IPTABLES -A OUTPUT -p UDP -o ${!riface} -s $ip -j ACCEPT
                                   done
                           fi
                 else                  else
                         print_info -en "$iface: Accepting OUTPUT UDP connections to ports:"                          print_info -en "$iface: Accepting OUTPUT UDP connections to ports:"
                         for port in $ACCEPT_OUTPUT_UDP; do                          for port in $ACCEPT_OUTPUT_UDP; do
Line 1279  allow_output()
Line 1284  allow_output()
                 fi                  fi
   
                 # ICMP                  # ICMP
                 for ip in ${!IPS}; do                  if [ -n "${!gateway}" ]; then
                         output_icmp_str="$output_icmp_str $ip(${!riface})";                          for ip in ${!IPS}; do
                         $IPTABLES -A OUTPUT -p ICMP -o ${!riface} -s $ip -j ACCEPT                                  output_icmp_str="$output_icmp_str $ip:${!riface}:${!gateway}";
                 done                                  $IPTABLES -A OUTPUT -p ICMP -o ${!riface} -s $ip -j ACCEPT
                           done
                   fi
         done          done
   
         if [ -n "$output_tcp_str" ]; then          if [ -n "$output_tcp_str" ]; then
                 print_info "Accepting OUTPUT TCP packets from $output_tcp_str done."                  print_info "Accepting OUTPUT TCP packets through $output_tcp_str done."
         fi          fi
         if [ -n "$output_udp_str" ]; then          if [ -n "$output_udp_str" ]; then
                 print_info "Accepting OUTPUT UDP packets from $output_udp_str done."                  print_info "Accepting OUTPUT UDP packets through $output_udp_str done."
         fi          fi
         if [ -n "$output_icmp_str" ]; then          if [ -n "$output_icmp_str" ]; then
                 print_info "Accepting OUTPUT ICMP packets from $output_icmp_str done."                  print_info "Accepting OUTPUT ICMP packets through $output_icmp_str done."
         fi          fi
 } # }}}  } # }}}
   

Legend:
Removed from v.2.100  
changed lines
  Added in v.2.101

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