Posted by Fred Atkinson on 07/11/05 18:00
On Mon, 11 Jul 2005 14:42:24 +0200, "Jeppe Uhd" <nnewsnospam@nx.dk>
wrote:
>Quite easily:
>
><? echo 'Your ip: '.getenv("REMOTE_ADDR"); ?>
You didn't quite understand what I'm trying to do.
Let me illustrate (the IP addresses are hypothetical):
IP Web NAT Internet User's
------ Server Gateway Cloud Client
Private 192.168.15.10 192.168.15.1
Public 17.15.21.4 21.15.5.7
If the client pulled a Web page off the server with the
function you describe, it would return 192.168.15.10 (a private IP
address that is not reachable by http://191.168.15.10 from the User's
client machine). I want it to return 17.15.21.4 (or whatever it would
change to when DHCP would provide a different IP address).
I have a service running on the server that updates my DNS
service when the public address for the NAT gateway changes and I have
port 80 requests made upon the gateway's public IP address poined to
192.168.15.10. To the client pulling a page from my Webserver, the
server's IP address is 17.15.21.4. That is what I want it to return.
Any ideas?
Regards,
Fred
[Back to original message]
|