--
---
You received this message because you are subscribed to the Google Groups "ossec-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ossec-list+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# usage <srcip>
checkWhitelist()
{
if [ "$1" != "" ]; then
WHITE_LIST=`grep "white_list" /var/ossec/etc/ossec.conf | \
cut -d">" -f2 | cut -d"<" -f1`
for ip in $WHITE_LIST; do
if [ "$1" == "$ip" ]; then
echo "checkWhitelist: IP is white listed, exitting"
exit 0
fi
done
fi
}
Probably not the most efficient way to do it but gave me the flexibility to handle syslog messages than contain hostname. May not be what you wanted but it worked for me.
Cheers,
Glen
--
---
You received this message because you are subscribed to a topic in the Google Groups "ossec-list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ossec-list/b_OeK6W6lPw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ossec-list+...@googlegroups.com.