6

I'm trying to find out the range of IP addresses that an Elastic Load Balancer could have from an EC2 instance which is behind it. This is so I can configure the HttpRealIpModule of nginx correctly.

I've found a list of EC2 public IP addresses but can't find any mention of the private IP range. My best guess is 10.0.0.1/8 - does anyone know if that is correct?

vitch
  • 600
  • 2
  • 7
  • 10
  • 2
    I'd imagine you could safely set it to the entire private address space - 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. – ceejayoz Nov 16 '11 at 18:54

2 Answers2

8

I know the question is fairly old, but as I got here I'm sure somebody could use this: You can set up an VPC and then use the ELB inside the VPC so you can make sure the ELB is always in you private IP range of you VPC (i.e. 10.10.0.0/16)

Osterjour
  • 825
  • 8
  • 12
7

According to this AWS page, it can be any private IP per RFC1918, which is indeed 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16, which is a pain. I wish they would restrict to, say, 10.0.0.0/8 so that we can have 172.16 for our private app use, such as hosting OpenVPN

Serge Wautier
  • 419
  • 1
  • 5
  • 16