Forum Discussion
teknet7_237497
Nimbostratus
Dec 14, 2015iRule: persist uie "$var1:$var2"
Hello Team,
I have just found i can create persistence entry using two variables example:
persist uie "$var1:$var2"
But not sure how can later use it.
Is it possible to hit it if matching...
StephanManthey
Nacreous
Dec 16, 2015You can use the
session command to build and lookup a separated table.
Depending on which party provides the framed IP one of the following rules will be applied to your RADIUS virtual:
Client provides framed IP:
rule for radius in case client provides the framed IP
when LB_SELECTED {
log local0. "session table entry added: "
session add uie "persist:[RADIUS::avp 8]" [LB::server addr]
}
Server provides framed IP:
rule for radius in case server provides the framed IP
when SERVER_DATA {
log local0. "session table entry added: "
session add uie "persist:[RADIUS::avp 8]" [IP::remote_addr]
}
The following one will be bound to your virtual server for HTTP (may be used in context of CLIENT_ACCEPTED as well):
rule for webservice
when HTTP_REQUEST {
log local0. "session table lookup result: [session lookup uie "persist:[IP::client_addr]"]"
if {[session lookup uie "persist:[IP::client_addr]"] ne ""} {
log local0. "lookup match: [session lookup uie "persist:[IP::client_addr]"]"
node [session lookup uie "persist:[IP::client_addr]"]
}
}
I don´t have a RADIUS up and running for testing but replicated it with another service in v11.5.1.
Perhaps you need to adjust the RADIUS part. Thanks, StephanHelp 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