Forum Discussion
John_Barrett_10
Nimbostratus
May 17, 2005Looking for a not equals
I am trying to do something as such.
rule MyRule{
when HTTP_REQUEST {
if { [HTTP::cookie exists "mine"] } {
if { [[HTTP::cookie "mine"] starts_with "3" ] and [IP::addr[IP::remote_addr] not equals 10.1.1.0/255.255.255.0] } {
pool bogus-onenode
}
} else {
pool real-onenode
}
}
Suggestions?
- John_Barrett_10
Nimbostratus
yes I have a default pool that things will fall through to. I just put up th snippet that I was unsure of.when HTTP_REQUEST { if { [HTTP::cookie exists "mine"] } { if { [[HTTP::cookie "mine"] starts_with "3" ] and not [IP::addr[IP::remote_addr] equals 10.1.1.0/255.255.255.0] } { log "The cookie starts with 3" pool bogus-onenode } else { log "Missed the cookie staring with 3" pool failsafe } } else { log "no cookie" pool real-onenode } }
- John_Barrett_10
Nimbostratus
Right, I am not looking for that what I am looking for is where it will log my log statements to? - bl0ndie_127134Historic F5 AccountDepending on whether or not you specify the facility, the messages may end up as entries in /var/log/ltm or as specified by /etc/syslog.conf. Here is the syntax and allowed values.
log [.]
"alert" "crit" "debug" "emerg" "err" "info" "warning"
"user" "syslog" "local0" "local1" "local2" "local3" "local4" "local5" "local6" "local7" "uucp" "authpriv", "cron" "daemon" "ftp" "kern" "lpr" "mail" "mark" "news" "ntp" "security"
log local0.info
- John_Barrett_10
Nimbostratus
Thanks for the info! I am coing to find out that between 9.0.4 and 9.0.5 syslogd changed to syslog-ng so I need to generate a new license to get this to work. Thank goodness this is a test box. - unRuleY_95363Historic F5 AccountThere is no relationship between syslog-ng and the requirement for a new license. Perhaps your license simply expired or was overwritten during the upgrade...?
- John_Barrett_10
Nimbostratus
Actually, it turns out there was a bug in the upgrade process (or maybe not a bug) but during the upgrade some fo the rpms never got installed, that's why I wasn't logging.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects