From: <abe...@us...> - 2015-12-26 14:10:28
|
Revision: 7428 http://sourceforge.net/p/astlinux/code/7428 Author: abelbeck Date: 2015-12-26 14:10:26 +0000 (Sat, 26 Dec 2015) Log Message: ----------- arnofw, add racoon filter type for 'Invalid exchange type' Modified Paths: -------------- branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh branches/1.0/package/arnofw/adaptive-ban/adaptive-ban.conf Modified: branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh =================================================================== --- branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh 2015-12-24 21:42:04 UTC (rev 7427) +++ branches/1.0/package/arnofw/adaptive-ban/adaptive-ban-helper.sh 2015-12-26 14:10:26 UTC (rev 7428) @@ -140,6 +140,8 @@ ;; pptpd) filter_pptpd "$file" "$PREFIX" "$HOST" ;; + racoon) filter_racoon "$file" ".*${type}:[[:space:]]*" "$HOST" + ;; *) log_msg "Unsupported type \"$type\"" continue ;; @@ -212,6 +214,14 @@ "$file" >"$TEMPFILE" } +filter_racoon() +{ + local file="$1" PREFIX="$2" HOST="$3" + + sed -n -r -e "s/^${PREFIX}ERROR: Invalid exchange type [0-9]+ from ${HOST}\[[0-9]+].$/\1/p" \ + "$file" >"$TEMPFILE" +} + count_attempts_then_ban() { local count="$1" type="$2" line host IFS Modified: branches/1.0/package/arnofw/adaptive-ban/adaptive-ban.conf =================================================================== --- branches/1.0/package/arnofw/adaptive-ban/adaptive-ban.conf 2015-12-24 21:42:04 UTC (rev 7427) +++ branches/1.0/package/arnofw/adaptive-ban/adaptive-ban.conf 2015-12-26 14:10:26 UTC (rev 7428) @@ -19,7 +19,7 @@ ADAPTIVE_BAN_COUNT=6 # A list of analysis types that are applied -# Choose from: sshd asterisk kamailio lighttpd prosody pptpd +# Choose from: sshd asterisk kamailio lighttpd prosody pptpd racoon # ------------------------------------------------------------------------------ ADAPTIVE_BAN_TYPES="sshd asterisk" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |