Forum Discussion
qqdixf5_74186
Feb 19, 2008Nimbostratus
Hi Aaron,
I was trying out your test rule for ip address matching. With a vliad ip address as follow, no match was found. Please advice. Thank you!
when RULE_INIT {
set ::match {}
set ::ip_address "10.10.10.10"
set ::ip_address_regex {\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b}
regexp $::ip_address_regex $::ip_address ::match
log local0. "\$::ip_address: $::ip_address; matched: $::match"
}