Forum Discussion
Adding Clinet IP in the response page
Hi Mates,
I have a requirement that i need to add client IP in the response page for a vitual server. I was creating it in lab for every request hitting to virtual sevre should show a page to client with his/her address on that. I wrote an irule but instaled showing the client ip value it is showing the variable name that i set in the irule. Can anyone help me to fix that. Below is the irule, I have written
when HTTP_REQUEST {
set IP IP::client_addr
HTTP::respond 200 content {
<html>
<head>
<title>Apology Page</title>
</head>
<body>
Access is restricted for client ip $IP
</body>
</html>
}
}
This will work... Modified iRule
when HTTP_REQUEST { set IP [IP::client_addr] log local0. "Client IP is [IP::client_addr]" HTTP::respond 200 content { <html> <head> <title>Apology Page</title> </head> <body> Access is restricted for client ip "[IP::client_addr]" </body> </html> } }
- Yogi
Nimbostratus
Tried this as well, it is not working.
Modified irule. see the logs in /var/ltm also.
Recent Discussions
Related Content
* 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