Forum Discussion
Anjlica_110059
Nimbostratus
Aug 09, 2007iRule closes connection
I modified the original question after I realised CLIENT_CONNECTED is not the right state to use inthe iRule when no connections exist.
------------------------------------------------
...
Anjlica_110059
Nimbostratus
Aug 09, 2007I am geeting closer. Here is a draft:
so basically the client sends a PSH,ACK it sends a string "LOGIN:userid:passwd" in the tcp paylod.
We don't want the iRule to be implemented if the client is doing an initial login.
So I am looking at first six octets - LOGIN to determine whether to use the iRule or not.
when CLIENT_ACCEPTED {
set payload_string = [TCP::collect 6]
log local0. "\$payload_string"
if (payload_string contains "LOGIN")
{
}
else
{
set src_ip_and_port [[IP::client_addr] ":" [TCP::client_port] ]
if { $src_ip_and_port != "" } {
persist uie $src_ip_and_port
}
}
}
}
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