Forum Discussion
Kamao
Nimbostratus
Apr 16, 2014FAILED selecting pool based on DNS reverse lookup result.
Hi,
I want to select pool based on DNS reverse lookup result for SMTP connection, but it not worked and following log appeared in /var/log/ltm.
iRUle:
when CLIENT_ACCEPTED {
NAME::lookup @ [IP...
nitass
Employee
Apr 16, 2014another solution off top of my head is to trigger LB_FAILED and reselect pool.
e.g.
config
root@ve10(Active)(tmos) list ltm rule qux
ltm rule qux {
when CLIENT_ACCEPTED {
log local0. ""
8.8.8.8 is dns server
203.216.231.189 is yahoo.co.jp
NAME::lookup @8.8.8.8 inet -ptr 203.216.231.189
fake node (to trigger LB_FAILED)
node 1.2.3.4 80
}
when NAME_RESOLVED {
log local0. ""
if { [domain [NAME::response] 1] eq "jp" } {
set pool_name foo
} else {
set pool_name default
}
}
when LB_FAILED {
log local0. ""
LB::reselect pool $pool_name
}
when SERVER_CONNECTED {
log local0. ""
}
}
log
[root@ve10:Active] config tail -f /var/log/ltm
Apr 16 17:44:53 local/tmm info tmm[4955]: Rule qux :
Apr 16 17:44:53 local/tmm info tmm[4955]: Rule qux :
Apr 16 17:45:05 local/tmm info tmm[4955]: Rule qux :
Apr 16 17:45:05 local/tmm info tmm[4955]: Rule qux :
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