Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There is a hardware LB redirecting http to an Nginx SSL Offloader listening only at 443. I have no access to the LB, but I need to verify if it is injecting the X-Forwarded-For header.

Why? I'm trying to log the client IP with http {

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

and server {

access_log    logs/access.log main;
set_real_ip_from       10.10.10.10;  #LB VirtualService IP
real_ip_header     X-Forwarded-For; 

but it is not logging. What I'm missing here?

P.D. Nginx 1.0.14 compiled --with-http_realip_module

share|improve this question

1 Answer 1

up vote 2 down vote accepted

To verify that the requests have the correct header as they reach the server, grab the traffic with tcpdump and inspect the HTTP request headers directly.

share|improve this answer
    
I was trying to avoid sniffing this encrypted traffic, but that is what I asked for, thanks. –  Eric Fortis May 22 '12 at 6:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.