[ale] Can't use public IP on local network

Kenneth Ratliff lists at noctum.net
Tue Apr 14 11:09:24 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Apr 14, 2009, at 7:44 AM, David M Lemcoe Jr. wrote:
> You may be misunderstanding. I have about 10 domains that I have
> VirtualHosts for, and they work just fine. But apparently, because I  
> use
> NAT, when my laptop (right there on the same router) goes to one of
> those, the router doesn't like it. Unless I'm mistaken, I don't know  
> if
> a NameVirtualHost would work, but I may be wrong


Alright, just went back and read the original message, and I guess I  
don't get it - What exactly are you trying to do?

NAT should only have any significance if you're trying to access your  
servers on a network other than the one on which the servers reside.

Am I to understand that you have multiple servers on your local  
network behind a NAT'd gateway and that you'd like to be able to  
access those machines, through the NAT, via the hostnames you have  
setup on the servers?

If that's the case, I'm going to assume that you only have one IP to  
show to the public, so you're doing overloading. In that case, getting  
to your servers from the outside world involves voodoo of one sort or  
another. The easiest way I've found is to simply do port redirection.

Ie, I have one public IP, foo.domain.com is setup on server1 and  
bar.domain.com is setup on server2. If I want to access both domains  
from the NAT, I call bar.domain.com:81 from outside of my network, and  
I have my router send requests from port 81 on it's public interface,  
to server2's IP on port 80.

The other method I use when I don't want to have to use port numbers  
to represent different servers behind the NAT and I'm dealing with a  
website, is to simply port 80 to one server, and then have that server  
pull websites from the other internal servers using ProxyPass and  
ProxyPassReverse.

Ie, if I go to foo.domain.com, I get forwarded to server 1 like a  
normal connection, but if I go to bar.domain.com, server 1 answers,  
pulls the site from server 2, and sends back an answer on server 2's  
behalf.

If I'm way wrong, could you give a more specific example of exactly  
what you're trying to do?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (Darwin)

iEYEARECAAYFAknkpycACgkQXzanDlV0VY5JXACdE5ERXvx9mMvf+U95MsiCJ+Qu
1MoAn3qgfDlVq7MtRrD7HnTsF6CKDvgr
=R0ca
-----END PGP SIGNATURE-----



More information about the Ale mailing list