Forum Discussion
mfkk531_168091
Apr 13, 2016Nimbostratus
Have to do reverse dns lookup on client IP, and insert the name into http header, and send to server. Help!
I'm currently doing XFF in http profile
I have a requirement to do reverse dns lookup on client IP, and insert the resolved name into http header, which the backend server can pick up.
Th...
- Apr 13, 2016
Maybe this?
when CLIENT_ACCEPTED {
when HTTP_REQUEST {
ekaleido
Cirrus
Maybe this?
when CLIENT_ACCEPTED {
set reverseDns [RESOLV::lookup @8.8.8.8 -ptr [IP::clientaddr]]
}
when HTTP_REQUEST {
HTTP::header insert YOUR_HEADER_NAME $reverseDns
}
ekaleido
Apr 13, 2016Cirrus
YOUR_HEADER_NAME would be whatever you name the header that the servers will be parsing out.
As far as specifying the DNS server, I found this stating you don't have to specify one assuming your local resolver has been setup properly:
"By default RESOLV::lookup queries the BIG-IP's local caching nameserver (bind) which you must configure in advance. If your RESOLV::lookup queries don't seem to work you should adjust your BIG-IP configuration as explained in f5 Solution Note SOL12224"
I hope this helps and I hope it works for you.
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