20-Aug-2018 11:01
Is it possible to create an irule that would capture a users IP address and then provide it back to them in the browser? We have users that have a hard time figuring out how to get their IP address from that PC. I wanted to create a VIP (with no assigned server pool) and apply an irule that would capture the IP address and respond back to the user in the browser with their IP address. Has anyone created this before? If so, can you help me?
Thanks
20-Aug-2018
11:08
- last edited on
02-Jun-2023
08:31
by
JimmyPackets
Something like this?
when HTTP_REQUEST {
HTTP::respond 200 content "Your IP address is: [IP::client_addr]"
}
10-Aug-2020 07:28
Trying to add this to a complex page being written by an irule that declares the HTML content in curly braces, like this:
HTTP::respond 200 content {
<html>
.....
}
If I put the "[IP::client_addr]" into the bracketed content, it prints out [IP::client_addr] instead of the value. How do I get it to do the substitution and print the actual value?