wifang / mollify

Automatically exported from code.google.com/p/mollify
0 stars 0 forks source link

Xforwarder Option #410

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have mollify n¿bvehinf load balancer, is posibly add xforwared option for 
recognize the source ip?

Original issue reported on code.google.com by marco.es...@gmail.com on 6 Jul 2012 at 3:44

GoogleCodeExporter commented 9 years ago
Could you be more specific, what should Mollify do differently? I'm not 
familiar with xforwarder, but this sounds like its a http header which needs to 
be set by web server

Original comment by samuli.j...@gmail.com on 6 Jul 2012 at 7:02

GoogleCodeExporter commented 9 years ago
yes, is over http header.

Ok i check my conf on web server

Original comment by marco.es...@gmail.com on 6 Jul 2012 at 8:44

GoogleCodeExporter commented 9 years ago
but i cheked y configure my apache with:

LogFormat "%h %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\"" combined
LogFormat "%h %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common
LogFormat "%{X-Forwarded-For}i %{Referer}i -> %U" referer
LogFormat "%{X-Forwarded-For}i %{User-agent}i" agent

but thje source ip is the same the webserver.

i need the ip from client.

Original comment by marco.es...@gmail.com on 6 Jul 2012 at 9:18

GoogleCodeExporter commented 9 years ago
Again, could you be more specific about what would you like Mollify to do 
differently? For example, is that you want the event logging to show the ip 
from the xforwarder header?

Original comment by samuli.j...@gmail.com on 7 Jul 2012 at 9:54

GoogleCodeExporter commented 9 years ago
For example, is that you want the event logging to show the ip from the 
xforwarder header?

Yes :D

Original comment by marco.es...@gmail.com on 9 Jul 2012 at 3:36

GoogleCodeExporter commented 9 years ago
OK, just wanted to make clear on what we are talking about here :)

Could you try with following file, copy it into "backend/include"

Original comment by samuli.j...@gmail.com on 9 Jul 2012 at 4:40

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks! Now take the source IP Address plus load balancer IP.

:D

Original comment by marco.es...@gmail.com on 9 Jul 2012 at 5:22

GoogleCodeExporter commented 9 years ago
Well, change the line 45 of that line into:

                return $headers['X-Forwarded-For'].' via '.$_SERVER["REMOTE_ADDR"];

Original comment by samuli.j...@gmail.com on 9 Jul 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Implemented in 1.8.9

Original comment by samuli.j...@gmail.com on 22 Jul 2012 at 12:19