Behavior of realip module with this config

Paul Nickerson pnickerson at cashstar.com
Thu Feb 9 22:49:13 UTC 2017


I've got the config below. I don't have these settings reconfigured
anywhere else. My understanding is that no matter anything else at all
anywhere else, and no matter whether the X-Forwarded-For field in the HTTP
header has one or multiple IP addresses, or isn't even present,
$remote_addr will not be altered.

set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;
real_ip_recursive on;

>From what I read, "real_ip_recursive on" means that $remote_addr can only
be set to an IP address that is not in the range set by set_real_ip_from.
And since that's 0.0.0.0/0, there is no IP that can meet this requirement.

Am I correct in my analysis?

http://nginx.org/en/docs/http/ngx_http_realip_module.html

 ~ Paul Nickerson

-- 


*CONFIDENTIALITY NOTICE*

The attached information is PRIVILEGED AND CONFIDENTIAL and is intended 
only for the use of the addressee named above.  If the reader of this 
message is not the intended recipient or the employee or agent responsible 
for delivering the message to the intended recipient, please be aware that 
any dissemination, distribution or duplication of this communication is 
strictly prohibited. If you receive this communication in error, please 
notify us immediately by telephone, delete the message and destroy any 
printed copy of the message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170209/70b5e355/attachment.html>


More information about the nginx mailing list