Forum Discussion
Jay_Cedrone
Jul 09, 2019Nimbostratus
iRule for RADIUS "calling station ID" attribute 31 (persistence)
I am looking for an iRule that will be persistent for both RADIUS authentication and RADIUS Accounting using RADIUS Calling Station ID (attribute 31). Thanks a lot, Jay
Lidev
MVP
Hello Jay,
you can adapt this irule who make persistence and User-name (1) and log Calling-Station-ID (31) and User-name (1)
when RULE_INIT {
array set ::attr_code2name {
1 User-Name
31 Calling-Station-Id
}
}
when CLIENT_ACCEPTED {
binary scan [UDP::payload] ccSH32cc code ident len auth \
attr_code1 attr_len1
set index 22
while { $index < $len } {
set hsize [expr {( $attr_len1 - 2 ) * 2}]
binary scan [UDP::payload] @${index}H${hsize}cc attr_value \
attr_code2 attr_len2
log local0. " $::attr_code2name($attr_code1) = $attr_value"
if { $attr_code1 == 1 } {
persist uie $attr_value 60
return
}
set index [ expr {$index + $attr_len1}]
set attr_len1 $attr_len2
set attr_code1 $attr_code2
}
}
Jay_Cedrone
Jul 10, 2019Nimbostratus
Thanks a lot Lidev,
Very much appreciated.
* Jay
- LidevJul 10, 2019MVP
you're welcome Jay ツ
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