Forum Discussion

mfkk531_168091's avatar
mfkk531_168091
Icon for Nimbostratus rankNimbostratus
Apr 13, 2016

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...
  • ekaleido_26616's avatar
    Apr 13, 2016

    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

     

    }