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>
}
}
5 Replies
- Matt_Dierick
Employee
Hi Colin,
What do you see in APM logs ? You can set log level in System > log > configuration > options.
- cpmortimer_1356
Nimbostratus
Hi Matthieu,
I have changed the log level to "debug". Where would I see the actual logs from attempted client connections?
Also, where should I actually be configuring cert based auth for this type of use? I have added the need for a cert in the Local Traffic > Profiles > SSL. Should I also have the "on demand cert auth" in the visual editor set up?
I am 100% new to F5 so fumbling my way around. I'll be honest, I have not found the documentation too useful for this unfortunately.
Thanks again.
Colin
- Matt_Dierick
Employee
To retrieve logs from APM : tail -f /var/log/apm From LTM : tail -f /var/log/ltm Run the command line first, and launch your client after.
For client cert validation, create a client SSL profile, in LTM, with "Require" client certificate. Import your CA and CRL if needed. In APM, create a policy with "client cert inspection" if you wants to retrieve information from the certificate. But it's not mandatory. LTM has already validated the certificate.
For a dynamic CRL inspection, you can use CRLDP ou OCSP in APM.
Hope this help.
- cpmortimer_1356
Nimbostratus
Hi Matthieu,
Thanks again for your response. I haven't forgotten, just having a number of challenges with this. I'm trying to figure out what the CLI user name and password might be as my colleagues who installed the appliance appear to have changed it from the defaults and don't know what they changed it to. Great huh? The defaults I found online suggest root/default, would you agree that is the default credentials for the appliance or something different?
Thanks,
Colin
- Matt_Dierick
Employee
Yeah, root/default and admin/admin. Both available by default.
- cpmortimer_1356
Nimbostratus
I dont seem to have access to run that command. Finally got in to the CLI, running that command returns: unexpected argument tail. I am unsure as to whether this access requires an additional license? This is an evaluation virtual appliance in our lab if that means anything.
Am attempting to work through an upgrade to 11.4.1 as advised by a colleague. Do you know if logs are available through the GUI here as they have suggested so.
Thanks,
Colin
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