Forum Discussion
Yogi
Nimbostratus
Apr 08, 2020Adding 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 c...
Samir
MVP
Apr 08, 2020This 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
Apr 08, 2020Tried this as well, it is not working.
- SamirApr 08, 2020
MVP
Modified irule. see the logs in /var/ltm also.
- YogiApr 08, 2020
Nimbostratus
I can see the ip in logs but on the respinse page it is not showing IP address instaed showing variable name or what ever we are writting in the boday it is taking as text
- SamirApr 09, 2020
MVP
Access is restricted for client ip [IP::client_addr]
Irule is correct, You can try one more time... without quote
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