Forum Discussion
wfaulk_98141
Altostratus
Mar 28, 2014Get information about Self-IPs in iRule
I have a need for an iRule that enables SNAT if the client and server addresses are in the same subnet. In practice, this only happens if the client and server addresses are on directly connected su...
Mohamed_Lrhazi
Altocumulus
Mar 28, 2014You probably dont need to know the selfip, it is the same subnet as the server right?
when LB_SELECTED {
set ClientIP [clientside {IP::remote_addr}]
set VirtualIP [clientside {IP::local_addr}]
set NodeIP [LB::server addr]
if { [IP::addr $ClientIP/24 equals $NodeIP/24] } {
if { $static::debug != 0 } {
log local0. "SNAT Client: $ClientIP to VIP: $VirtualIP targeting Node: $NodeIP"
}
snat $VirtualIP
}
}
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