htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How do I get the client's IP instead of my firewall's?
PostPosted: 04 Mar 2008 17:06 
Offline

Joined: 04 Mar 2008 16:41
Posts: 1
Hi,

I'm migrating our website from our gateway/firewall over to a dedicated webserver that will sit behind the gateway. There are scripts on the website that do access control and display custom content depending on whether the client's IP address is external or internal (they're a lot of them, so rewriting them isn't feasible).

I got the gateway to forward HTTP traffic to the dedicated webserver. However, the CGI on the webserver all see the gateway's IP address when looking at the REMOTE_ADDR environment variable.

Is there a way to allow the webserver's CGI to see the client's or client's firewall's real IP address instead of our gateway's? As I mentioned before, there are a lot of scripts that need to do application level customization and access control based on whether the client's external or internal, so rewriting them all isn't a feasible solution for us.

Here's our setup.
Gateway:
SuSE Linux 8.1, using iptables (netfilter) for its firewall and routing

Webserver:
SuSe Linux 10
Apache HTTPD 2.2.3

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: 27 Mar 2008 02:45 
Offline
User avatar

Joined: 25 Sep 2006 04:48
Posts: 242
That is a software issue, you could set up forwarding or use a transparent proxy like squid.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB