X-FORWARDED-FOR AND ERASING SNAT IP FROM APACACHE LOGS
I am using x-forwarded-for and the web server admins would like to not see the snat ip in the logs. Currently I see both the client and snat ip. The client being 208.97.218.10 and snat 10.128.254.13. Can something be done within the x4 profile? - "Request Header Erase"? I
Apache logs 208.97.218.10, 10.128.254.13 - - [08/Jul/2014:10:06:42 -0500] "GET /XXXXXX/ HTTP/1.1" 200 2313 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11"
208.97.218.10, 10.128.254.13 - - [08/Jul/2014:10:06:42 -0500] "GET /XXXXXX HTTP/1.1" 304 - "XXXXXX" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11"
Apparently the below irule also did not work to clear the double entries:
when HTTP_REQUEST { if {[HTTP::header exists X-Forwarded-For]}{ HTTP::header replace X-Forwarded-For "[HTTP::header X-Forwarded-For], [IP::remote_addr]" } else { HTTP::header insert X-Forwarded-For [IP::remote_addr] } } }