Forum Discussion
Gavin_Coulthar1
Sep 16, 2005Historic F5 Account
Substituting IP addresses for RADIUS proxy
Hi,
Have a query and looking for an iRule that would perform the following...
For a proxy radius application in which a proxied radius forwards requests to a legacy radius server needs to have the original source IP address rather than the source IP address of the radius proxy. The initial thinking is to have the proxy server add a "Proxy-State" attribute to the request that would contain both the required source IP address and the return IP address, and have the f5 use an iRule(s) to extract the information from the radius request and rewrite the IP addresses as indicated.
The radius request would contain something like this:
Proxy-State = "Source-IP-Address=1.1.1.1, Return-IP-
Address=2.2.2.2"
any thoughts or ideas on how to shape an appopriate rule ?
- unRuleY_95363Historic F5 AccountYou could certainly parse those addresses and then use the node command to set the destination and the snat command to set the source.
- Gavin_Coulthar1Historic F5 Accountthanks v.much for that - an example would also greatly assist if you could help. I'm still getting my head around forming iRules..
- Gavin_Coulthar1Historic F5 Account
- Gavin_Coulthar1Historic F5 Accounthi,
- ichalis_37981Historic F5 AccountHi,
- JRahm
Admin
Try this (untested!)scan [UDP::payload] "Source-IP-Address=%u.%u.%u.%u, Return-IP-Address=%u.%u.%u.%u" s1 s2 s3 s4 r1 r2 r3 r4 set src_ip [format "%u.%u.%u.%u" $s1 $s2 $s3 $s4] set dst_ip [format "%u.%u.%u.%u" $r1 $r2 $r3 $r4]
- Gavin_Coulthar1Historic F5 Account
- Oops, Looks like I posted too soon. If you can delimit the end of your string with a comma, then the findstr approach is much better.
when CLIENT_ACCEPTED { set src_ip [ findstr [UDP::payload] "Source-IP-Address=" 18 ","] set ret_ip [ findstr [UDP::payload] "Return-IP-Address=" 18 ","] log $src_ip log $ret_ip }
- ichalis_37981Historic F5 AccountGuys,
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