Apache Log broke using iptables and port forwarding
Ok, here is one that has me stumped... I was using an inexpensive ADSL/Cable router/firewall for my home ADSL connection. I am hosting a non-profit website from the connection. I have tried two different vendors routers and each had issues that prevented good service from them. One would stop forwarding to port 80 on the webserver address if IM was fired up on any other internal machine and the other would simply go to sleep for no reason and need a power cycle. SO, I ended up taking an old laptop, plugging in two PCIMIA NIC cards (3Coms) and setting it up as a router/firewall using Linux 2.4.20 and iptables. That has worked better than anything so far. Fantastic to be exact... Those two routers you ask? They are now simply fast Ethernet switches. (sorry for the ramble...)
Ok so now the current issue/challenge... before, apache access logs tracked the proper IP address of the Internet user accessing the website. Now with the Linux-iptables port forwarding setup, only the IP address of the PPP0 port of the laptop/firewall is listed in the access log for every connection made. Obviously every httpd request is stamped coming from the firewall as it is after all "forwarding" the traffic.
Any ideas on how to set up iptables and port forwarding to enable apache logs to capture the end users IP information? Please let me know if this is in the wrong area... seems to fit this forum, but I wasn't 100% sure...
Thanks in advance...
Last edited by rwyarbrough; 01-13-2004 at 11:22 PM.
|