Forum Discussion
Ken_Wong_48678
Aug 01, 2005Historic F5 Account
use irule to match virtual server name to node name
Hi,
This is Ken. I encounter a problem and need to write some irule to help.
There are two notes servers, client collect the server should use the server's hostname. The server discard any non...
Ken_Wong_48678
Aug 03, 2005Historic F5 Account
Hi,
I combined your suggestion and write the following rule, but some errors occur, pls. help.
I am trying to replace the hostname in TCP payload and then pass to specify pool.
Check if the request hostname is WEBCSD0AN, change to WEBCSD01N and use pool WEBCSD01N_pool.
if request hostname is WEBCSD0BN, change to WEBCSD02N and use pool WEBCSD02N_pool.
Regards,
Ken
when CLIENT_ACCEPTED {
if { [TCP::remote_port] == 1352 } {
log local0. "Connect to Notes Server [IP::client_addr]:[TCP::client_port] --> [IP::server_addr]:[TCP::server_port]"
TCP::collect
}
}
when CLIENT_DATA {
set orig_host_start [string first "CN=" [TCP::payload]]
TCP::release $orig_host_start
TCP::collect
set orig_notes_host [string range [TCP::payload] 3 12]
if { $orig_notes_host matches "WEBCSD0AN" } {
TCP::payload replace 3 12 "WEBCSD01N"
pool WEBCSD01N_pool }
else {
TCP::payload replace 3 12 "WEBCSD02N"
pool WEBCSD02N_pool }
TCP::release
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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