=================================================================== RCS file: /home/cvsd/home/cvs/scripts/shell/firewall/fw-universal.sh,v retrieving revision 2.30 retrieving revision 2.31 diff -u -p -r2.30 -r2.31 --- scripts/shell/firewall/fw-universal.sh 2005/11/01 00:36:24 2.30 +++ scripts/shell/firewall/fw-universal.sh 2006/01/05 18:14:57 2.31 @@ -9,7 +9,7 @@ # Licensed under terms of GNU General Public License. # All rights reserved. # -# $Platon: scripts/shell/firewall/fw-universal.sh,v 2.29 2005/11/01 00:12:49 rajo Exp $ +# $Platon: scripts/shell/firewall/fw-universal.sh,v 2.30 2005/11/01 00:36:24 rajo Exp $ # # Changelog: # 2003-10-24 - created @@ -422,10 +422,15 @@ log_new_connections() { # {{{ if [ ! -z "$NAT_LOG_NEW_CONNECTIONS" ]; then if [ "x$NAT_LOG_NEW_CONNECTIONS" = "xyes" ]; then - echo -en "Logging new connections:" - $IPTABLES_LOG -A INPUT -m state --state NEW -j LOG --log-prefix "IN connection: " - $IPTABLES_LOG -A OUTPUT -m state --state NEW -j LOG --log-prefix "OUT connection: " - $IPTABLES_LOG -A FORWARD -m state --state NEW -j LOG --log-prefix "FWD connection: " + if [ "x$NAT_LOG_NEW_CONNECTIONS" = "xyes" ]; then + NAT_LOG_NEW_CONNECTIONS="TCP UDP" + fi + echo -en "Logging new connections $NAT_LOG_NEW_CONNECTIONS:" + for proto in $NAT_LOG_NEW_CONNECTIONS; do + $IPTABLES_LOG -A INPUT -m state --state NEW -p $proto -j LOG --log-prefix "IN connection: " + $IPTABLES_LOG -A OUTPUT -m state --state NEW -p $proto -j LOG --log-prefix "OUT connection: " + $IPTABLES_LOG -A FORWARD -m state --state NEW -p $proto -j LOG --log-prefix "FWD connection: " + done echo " done." fi fi