Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want all computers in the network to use my hosts file. How is it possible to do? Should I create a DNS server on my laptop or what?

UPDATE: OS - Windows 7, 64 bit. The goal is to restrict the access to some web sites.

share|improve this question
    
What operating system? –  Keith Jul 21 '11 at 10:14
    
Not enough information - what operating systems, what's the final goal, is your laptop going to be powered on all the time. Please provide more detail. –  EightBitTony Jul 21 '11 at 10:23
    
DNS is not an appropriate way to restrict access. Try Untangle: untangle.com –  Brad Jul 21 '11 at 15:13

3 Answers 3

up vote 0 down vote accepted

If the goal is to restrict access to some web-sites by deliberately re-pointing specific DNS addresses to other IP's, then DNS server could be part of what you need. If you went with the DNS server method, you would also need to make sure the other computers use your DNS server and not some other one on the internet. You could do this by configuring it in each computer separately, or you could set up a DHCP server to point the other computers to it.

Another solution is to set up a proxy server with the appropriate configurations for the web-sites you're trying to block, and then configure all of the other computers to use your proxy server in their specific web-browsers.

I would not generally suggest using a laptop as a server though, unless you never unplug it from the network. If it is the DNS server, and someone tries to browse the net while you were unplugged, they may not be able to.

The last option I can think of is to write a script that copies your HOSTS file to the other computers, and run this script as either a scheduled task, or run it manually when you update the HOSTS file. Depending on what sort of permissions you have on the other computers, you could run the script on your laptop and copy it to the other computers, or the script could run on the other computers and copy it from your laptop.

share|improve this answer

You can. I use an onboard DNS server because it is much faster. Posadis is good. TreeWalk, SANS, and Simple DNS Plus are others. They all work, but stability and options make them slightly different from one another.

If you set it up as a caching server, you will also have DNS name resolution when the online DNS servers go down, at least for the cached IP's.

share|improve this answer

The DNS is not the answer to an HTTP problem.

So put down the chocolate-covered banana and step away from the European currency systems. You never really wanted "all computers in the network to use my hosts file" at all.

If you want to restrict HTTP access for certain WWW sites, the correct approach is to work on your HTTP services, not your DNS services. Use one of two approaches:

  • Set up a proxy HTTP server, that filters out all of the undersirable sites, and force everyone on your LAN to use it. One can use various tools to automate configuring everyone's WWW browsers to use a specific local proxy HTTP server.
  • Create a Proxy Auto Configuration script that simply directs requests for URLs matching the patterns of the undesirable WWW sites to a dummy content HTTP server somewhere, just as people such as John R. Lo Verso do in order to filter advertising WWW sites out. Require that everyone on your LAN use that PAC script in their WWW browsers. Again, there are ways of automatically configuring WWW browsers to use PAC scripts.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.