views:

307

answers:

1

I'm using Apache2, Ubuntu 8.10. Currently Apache is logging the gateway's IP as the host ip, what do I have to do to get it to log the remote client's IP address instead? Is this even possible, or does the NAT router "lose" it for good?

Update: It actually looks like it's only logging the gateway's IP for addresses from within the network, external requests seem to be logged with the correct IP... Go figure.

A: 

It is not apache that is fault but your NAT/Firewall. It needs to be configured to "impersonate" (not the right term, but it'll do) the IP when it sends the request to apache. How to configure that depends on the answer to the question: what is your firewall?

Robert MacLean
Ok, it's a Linksys WAG54G. Never noticed that option in the config settings, will look again. I was kind of hoping there might be something added to the headers, but that's a bit much to hope since it's just forwarding the port, not proxying it.
Tom