LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with request in LAN (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-request-in-lan-4175507552/)

l0pht 06-09-2014 11:14 PM

problem with request in LAN
 
Hi friends
i have a terrible problem, there is a web server in my LAN with ip 192.x.x.x
when internet is disconnected on this server, page is too slow to open in my LAN.
in my resolv.conf i have :
search google.com
nameserver 127.0.0.1
nameserver 8.8.8.8
----------------------------------------------
how can i fix this?
thanks

LinBox2013 06-09-2014 11:30 PM

Quote:

Originally Posted by l0pht (Post 5185462)
Hi friends
i have a terrible problem, there is a web server in my LAN with ip 192.x.x.x
when internet is disconnected on this server, page is too slow to open in my LAN.
in my resolv.conf i have :
search google.com
nameserver 127.0.0.1
nameserver 8.8.8.8
----------------------------------------------
how can i fix this?
thanks

Well the problem makes sense. You are telling the file to resolve but it cannot resolve when the net is disconnected. So it probably sits there and pings and pings and pings and slows down the whole network ability on the machine. If you simply want it as a LAN server then set it up that way and the problem will be solved, if you want it as a web server keep it connected to the web and the problem will be solved.

Thank in my opinion is how you fix the problem.

EDIT: Why do you have it setup this way anyhow? If you have a lan then you have a router or something sitting in between you and the net. Why does the server machine even have to communicate directly with the net when you could have requests pointing to that machine so the router or whatever can do the hard lifting? Open the machine on your network then direct the router to forward requests to that machine and X port or whatever. This is very easy and I have done this many times without any special settings at all. Let the router do the work and let the server just be a node on the network. Easy and takes care of the problem because the requests look as if they are coming from the network every time.

l0pht 06-09-2014 11:44 PM

thanks
is there a way to say in resolv.conf to server that when a request comes use local network to resolve and then if no! use public dns servers?
ty

LinBox2013 06-10-2014 12:56 AM

Quote:

Originally Posted by l0pht (Post 5185469)
thanks
is there a way to say in resolv.conf to server that when a request comes use local network to resolve and then if no! use public dns servers?
ty

Doing it the way I am talking about there is nothing special you have to do. Whether it comes from the local network or not. What you will be creating by what I am saying is a local network server and simply using the router to forward requests to the specific machine that is the server. Setup the router to resolve DNS and to provide it to the local network. You can use the the DNS server you are using for the whole network. My router has an option to specify specific DNS servers for specific machines if I so choose, but I don't do it that way. I have set up a few servers in my time and used the method I speak of. There is no need to seclude the server on the network, the job of the router is to protect the network. Comb through the router settings and set the router up to do the job it was designed to do.


All times are GMT -5. The time now is 01:42 AM.