Forum: NGINX Blocking based on proxy_add_x_forwarded_for

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shri @ DevLib.Org (Guest)
on 2009-03-11 07:51
(Received via mailing list)
I have a situation where a fair number of spammers are sneaking in
through proxy servers.

Their real IP addresses can be traced back and identified.

Our current blocking works like this.

        location / {
              deny A.B.0.0/16;
        }

Is there any way possible where I could check the
$proxy_add_x_forwarded_for address and block these spammers on our
forums?

Regards,
Shri
Igor S. (Guest)
on 2009-03-11 08:48
(Received via mailing list)
On Wed, Mar 11, 2009 at 01:40:54PM +0800, Shri @ DevLib.Org wrote:

> Is there any way possible where I could check the $proxy_add_x_forwarded_for address and 
block these spammers on our forums?
Only using "set_real_ip_from". However, you should use it for trusted
proxy servers only as anyone may write anything in X-forwrded-For
header.
This topic is locked and can not be replied to.