Can we run local server over local network without internet access?

4

1

Suppose I have a central server and all other local computers are using the server on that machine. Suppose Internet is down, can I access the server through local network? DO we need special settings on router / server level?

Last time I checked, I can't. My laptop runs the server, and I just couldn't use the server on my local desktop.

Thanks.

CppLearner

Posted 2012-03-14T18:30:45.307

Reputation: 603

1What kind of server? Maybe your Laptop had the firewall enabled. Also "internet is down" needs some more details. – Turbo J – 2012-03-14T18:35:04.010

+1 to the above. In GENERAL, servers should be usable over the LAN they are on without internet, but it does depend on what the server does. If it needs to access the internet to perform any of it's functions, then while the clients on the LAN can see it, the server may not work. We need to know more details of the situation to answer your question. please edit your question to provide more information. Perhaps server Operating system and server function at the very least. – Paperlantern – 2012-03-14T18:42:26.747

Great answers. Mostly some apache, or lighttpd :) haha – CppLearner – 2012-03-14T21:44:50.473

Answers

5

The (probable) reason you cannot access the server through your laptop is because of DNS not resolving. It is trying to connect to server via an external IP ( the one connected to internet) and of course, that won`t work.

If your server is connected to Internet, it is most probably assigned and accessed via a Domain name, ie: server.mycompany.com.

This server should (usually) be accessible by 3 methods: the DNS name, an external ip, or an internal ip. This last method is what we need to access locally.

If it is a web application you need to access, simply using the internal ip of the server would suffice to access it:

Instead of server.mycompany.com, one would use the ip, ie: http://192.168.0.23

To avoid your laptop being disconnected from the server when internet is down, you could add an entry in your host file that points to the local ip, IE:

server.company.com    182.168.0.23

Of course, this means when outside your local network, you would need to remove this entry to allow the DNS to resolve through the external ip / interface.

Hope this helps, good-luck!

stefgosselin

Posted 2012-03-14T18:30:45.307

Reputation: 438

It helps a lot :) Thanks. I remember running 127.0.0.1 when I was younger without Internet. Now it's good :) – CppLearner – 2012-03-14T21:45:29.480

5

Yes you can if the server is listening on the Local Area Network interface. You can check if the server is listening on the LAN interface by using netstat (on a Windows machine). You could also disable the firewall temporarily to see if this is the cause of your problem. enter image description here

colemik

Posted 2012-03-14T18:30:45.307

Reputation: 1 414

1NICE PICTURE! Hahaha. I get it now. Thank you very much :) – CppLearner – 2012-03-14T21:45:48.597