Forum Discussion
Kazeem_Yusuf
Altostratus
Aug 20, 2026irule to insert http header with values based on received radius accounting avp
I have a requirement to insert msisdn gotten from radius logs into https virtual server (http irule). It is pretty similar to this. insert HTTP header according to a value received in Radius accoun...
mwolf
Nimbostratus
Aug 20, 2026
Are you sure that the table lookup is returning an empty value on the HTTP virtual server?
You could add a logging before the IF in the HTTP iRule.
when HTTP_REQUEST {
set client_ip [IP::client_addr]
set msisdn [table lookup -subtable "ip2msisdn" $client_ip]
log local0. "IP $client_ip MSIDSN $msisdn"
if { $msisdn ne "" } {
HTTP::header insert "X-MSISDN" $msisdn
HTTP::header insert "X-Auth-Status" "AUTHORIZED"
} else {
HTTP::header insert "X-Auth-Status" "UNKNOWN"
HTTP::header insert "X-MSISDN" "NOT_FOUND"
}
}
-Matt
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