Brian_Gibson_30
Feb 19, 2015Nimbostratus
Transforming an IP address via IRule
I am trying to take a client IP and convert it to a new IP using a generic IP address mask but using the last 2 octets of the client's IP.
My RegEx skills are not the greatest but this really doesn't seem that it should be that hard. So I'm not sure what I am doing wrong here as the regex seems ok. I tried to use braces on the regex but the LB said that my pattern didn't do anything then.
when CLIENT_ACCEPTED {
set clientip [IP::client_addr]
regsub "^\d+.\d+." $clientip "10.99." newip
log local0.info "value on transformed IP is $newip"
}