When you say "Access this server by domain name" what exactly do you mean? - Ken Schaefer |
Tuesday, February 13, 2007 4:14 PM
|
When you say "Access this server by domain name" what exactly do you mean?
If you have a publicly resolvable FQDN that points to your external IP
address, then your requests will go out to the external interface of your
NAT router. The NAT router then port forwards the requests to your internal
host. It may be that your Linksys box does something fancy to the packets
(subsituting the external IP as the source IP) because it shouldn't be
routing packets from your internal network into your network from the
external interface...
Cheers
Ken |
 |
No, you misunderstand REMOTE_ADDR. - David Wang |
Wednesday, February 14, 2007 7:11 AM
|
No, you misunderstand REMOTE_ADDR. It does not return the "IP address
of the machine accessing the page".
It returns the source IP of the network packet which originated from
the client which actually reaches the server. That source IP depends
on how the network packet gets routed to your server.
My advice is that whatever REMOTE_ADDR returns is what you get, so if
you don't like the value, you have to change your networking to make
it route the way you want. Read what Ken has said.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
// |
 |