Viewing web services inside LAN via Internet

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed Sep 15 04:52:13 UTC 2004


Yes it is but you will need to either setup your own DNS server or keep 
a copy of a 'hosts' file with the INTERNAL IP of the servers. This is why:

When your client calls the webserver it does so under normal 
circumstances using it's public IP address. The web server then sees 
that the requesting computer is in it's private IP subnet and responds 
using it's own private IP. The client computer sees the webserver as 
responding with it's internal IP, notes that it made the request to the 
external IP, and ignores the responce thinking that it is the wrong 
server answering.

To get around this you can either put the web server on a seperate 
subnet from the LAN clients and route through a router/firewall with 
three NICs; one for the Internet, one for the web-server subnet and one 
for the LAN client subnet. I personally use this because once it's up it 
is the simplest to maintain. You second option is to set up your DNS 
server (assuming you are using your own) to give the LAN-side IP of the 
server to clients withing the same subnet while giving the web server's 
public IP to any other client outside the subnet. The last option which 
is the easiest to get going but the hardest to maintain is to keep a 
copy of the 'hosts' file (in /etc/hosts for most Linux distros) which 
translates the web-server's name to it's internal IP so that each client 
never even tries DNS to get the IP ('hosts' is always checked before DNS 
is). Keep in mind that you will need to keep each 'sub.domain.tld' in 
the hosts file.

Hope that helps!

Madison


JM wrote:
> Hi,
> 	is it possible to view a web service sitting inside our LAN via internet
> 
> 	sample setup
> 
> 	boxA (with global IP and LAN IP)
> 
> 	boxB (LAN IP only) - this is where the Web service sits.
> 
> 	boxA and boxB are connected via the same segment of LAN IP.
> 
> 
> Thanks,
> 
> 		
> 
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
> 

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list