Project

General

Profile

Actions

Bug #1619

closed

X-Forwarded-For multiple IPs

Added by Markus Falb over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have 2 proxies chained, and this results in the following:

Processing UnattendedController#gPXE (for X.X.X.X at 2012-05-03 21:29:19) [GET]
  Host Load (0.3ms)   SELECT * FROM "hosts" WHERE ("hosts"."ip" = 'X.X.X.X, Y.Y.Y.Y') LIMIT 1
unattended: unable to find ip/mac match for X.X.X.X, Y.Y.Y.Y and mac 
Filter chain halted as [:get_host_details] rendered_or_redirected.
Completed in 8ms (View: 1, DB: 3) | 404 Not Found [http://whatever/unattended/gPXE]

I may cite the documentation for apache
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Be careful when using these headers on the origin server, since they will contain more than one (comma-separated) value if the original request already contained one of these headers. For example, you can use %{X-Forwarded-For}i in the log format string of the origin server to log the original clients IP address, but you may get more than one address if the request passes through several proxies.

If I understand this correctly there should be something like a split(',')[0] somewhere.

Actions #1

Updated by Ohad Levy over 12 years ago

  • Category set to Unattended installations
  • Assignee set to Ohad Levy
  • Target version set to 1.0
Actions #2

Updated by Ohad Levy over 12 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF