Forum Discussion
Luke_W_168008
Nimbostratus
Nov 27, 2018IP::remote_addr is adding %1 at the end
I have an iRule that I'm trying to save the remote/client IP address to a variable then compare it to specific IP addresses. The variable is ending in %1 how do I remove the %1?
when CLIENT_ACCEPTED {
set ipadd [IP::remote_addr]
log local0. "IP addr is $ipadd"
if { $ipadd equals"192.168.1.21" }
{
pool smtp03
}
elseif
{ $ipadd equals "192.168.3.99" }
{
pool smtp02
}
else
{
pool smtp01
}
}
The log entry look is showing: Rule /common/SMTP_Routing : IP addr is 192.168.3.99%1
1 Reply
- Stanislas_Piro2
Cumulonimbus
This is because of route domains...
Replace
with[IP:remote_addr]
to split the address with % as separator.[getfield [IP:remote_addr] % 1]
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