Welcome! Log In Create A New Profile

Advanced

Re: GeoIP blocking behind AWS ELB + proxy protocol

Francis Daly
October 29, 2014 07:06PM
On Wed, Oct 29, 2014 at 01:35:50PM -0500, Joe Rizzo wrote:

Hi there,

> I have nginx servers behind an AWS ELB. Because web sockets are
> leveraged, the ELB is configured as TCP load balancing with the proxy
> protocol option set. The true IP address of the client is extracted as
> variable $proxy_protocol_addr.
>
> How would I configure nginx to allow/deny access based on the
> $proxy_protocol_addr variable?

According to http://nginx.org/en/docs/http/ngx_http_geoip_module.html, the
module uses the client IP address or something from the X-Forwarded-For
header.

I suspect that if you want to use a different variable, the simplest
pure-config way would be to reverse proxy to another nginx server{},
including your variable in the X-Forwarded-For header, and do the normal
processing (including the deny/allow that you want) there.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

GeoIP blocking behind AWS ELB + proxy protocol

rzzldzzl October 29, 2014 02:38PM

Re: GeoIP blocking behind AWS ELB + proxy protocol

Francis Daly October 29, 2014 07:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 210
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready