The "hosts file" is a common tool in operating systems to map names to IP addresses. These mappings usually take precedence over the DNS system.

learn more… | top users | synonyms

-1
votes
1answer
234 views

Multiple Apache Servers with Multiple Virtual Servers

I have one computer. I am running two instances of 2 differently installed Apache servers. 1 via WAMP 1 via Zend Framework I wish for wamp to be connected towards "karl.local" And for Zend to be ...
0
votes
2answers
1k views

Edit hosts - run as administrator does not work

I am trying to edit hosts file on my computer. I click start -> find notepad shortcut -> run it as administrator (window on dimmed background appears) -> i press yes -> find hosts file -> edit it -> ...
0
votes
4answers
162 views

Get an alert when my parents browser reach a certain domain

I recently noticed that a Firefox toolbar get frequently installed on my parents computer. I managed to trace back the method it is using to get installed (through a link that looks like a Firefox ...
0
votes
2answers
357 views

Forbid connection to IP address in hosts file doesn't work?

The hosts file is used to map hostnames to IP addresses. However, I only have an IP address. I tried using HostsMan, but it doesn't want to even add the line. How do I add a line to the hosts file ...
0
votes
3answers
564 views

Password protect /etc/hosts file

Can I create a different permission to access the hosts files so that the sudoer needs this extra key in order to access it? Also, would password protecting the file prevent OS from accessing it ...
1
vote
0answers
582 views

Can I force Tor/Polipo to use locally defined hosts?

I would like to use addresses defined in my hosts file while using Tor. I have the Tor (non-browser) bundle installed: Tor, Polipo and Vidalia. I do not use Torbutton. My browsing is normally done ...
3
votes
2answers
1k views

Quickly edit / change hosts file on Windows

I routinely need to add / remove / update hosts on a Windows 7 machine to add links to staging / test servers. On Mac I can use ghosts with the syntax ghost add staging-server.local ...
0
votes
2answers
3k views

Create a shortcut with administrator rights for hosts file in Win 7

I'm trying to create a shortcut link on my desktop that is a link to the hosts file in Windows 7. The problem is that this shortcut will not open in administrator mode as the option will be greyed out ...
3
votes
4answers
7k views

How do I tell Google Chrome to read a different hosts file?

At work in my university, the computers in the office all use Windows XP, latest service pack. They've given each one of us a regular account, with no way of installing programs or making ...
2
votes
2answers
3k views

Hosts file switcher on linux

It appears there are a ton of utilities to manage the hosts file on OSX. I haven't been able to find even one like http://www.macupdate.com/app/mac/29949/gas-mask for linux. I keep my hosts file ...
4
votes
2answers
13k views

Why does my “hosts” file entry have no effect when accessing network shares?

I added the following line to a Windows7 hosts file: 127.0.0.1 mecserver Using ping mecserver works fine, but if I use this name to connect to the notebook (like localhost) to see the Windows ...
3
votes
1answer
2k views

Chrome, Safari, IE not recognizing hosts file in Windows 7

I have a new clean install of Windows 7. I've edited the hosts file and when I ping from the command line the correct settings are used — the ping goes to a local network server instead of out ...
6
votes
2answers
9k views

How to make changes to Mac /etc/hosts permanent?

On my Mac (running OS 10.6.8), I can edit my hosts file with sudo vi /etc/hosts, but changes I make don't seem to persist through restarts or possibly awaking from sleep mode. Is there a way to make ...
3
votes
4answers
2k views

Is it a good idea to tweak the hosts file to speed up internet browsing?

Yesterday I came across a Firefox extension called Speed DNS which claims to speed up browsing by performing DNS lookups in advance. According to the author, it "does DNS pre-resolution of all the ...
3
votes
4answers
16k views

Permissions for editing hosts file on Windows 7 Home Edition

I am running Windows 7 Home Edition on my laptop. I also have an instance of Apache Server running and am trying to create a virtual directory. I have updated apache's vhost-httpd file and now need ...
3
votes
0answers
3k views

Windows 8. Hosts file doesn't work

I am using Windows 8 developer preview (x64) for testing purposes. I want to access some local network resource by DNS. So, I've added next line to my hosts file (%sindir%/system32/drivers/etc/hosts): ...
0
votes
2answers
95 views

What are the important things that need to be taken care while setting a network connection between systems?

I have an application which has a client edition(workstation) and server edition(service). The client edition is on Windows XP and the server edition is on Windows Server 2003. We have a lot of ...
0
votes
1answer
363 views

How to display user defined message on the browser after blocking website using hosts

I am using the hosts file for blocking websites, and when we try to open that website the browser shows some default message, but I need to display my own message. Is there any possibility for ...
0
votes
1answer
2k views

Remove read-only status of hosts file

I'm trying to edit my hosts file on a Mac Tiger OS. When trying to edit the file I get the following output and I'm unable to save any changes. "hosts" [readonly] 14L, 330C` How can I fix this?
2
votes
1answer
352 views

Changed /etc/hosts entries, but they are still pointing to localhost

I've had two sites on my local host and have had mysite1.local and mysite2.local in my /etc/hosts file to pointing in my localhost. Now, I moved those sites into my homeserver (Ubuntu, Local network) ...
2
votes
3answers
825 views

ad blocking host file, shared to all computers on local network

I currently update my local hosts file with advertising server domain names and direct them to nowhere. Well, almost nowhere. I point them to 127.0.0.1 and I don't have a web service running so it is ...
19
votes
4answers
12k views

/etc/hosts getting reset in Lion

In order to do web development on my local machine, I use the /etc/hosts file to define hosts that point back to 127.0.0.1 to which I have Apache serve up via VirtualHosts. This works great, except ...
4
votes
2answers
2k views

Is there a way to cause chrome/ie/firefox to reload the local “hosts” file without restarting the app?

In my occupation as a sysadmin, I often find times where I need to "game the system" by editing the host file. Doing so preempts any dns records for a domain name and allows me to make the ip ...
17
votes
4answers
6k views

Force Chrome to open URLs as URLs, instead of searching

I have a local Apache server running, which is defined through /etc/hosts as "apache". So I often open pages like: http://apache/website/ Normally, this works fine. However, since I am using a more ...
1
vote
1answer
309 views

How to disable unneeded error message using hosts file in Google Chrome

OS=Debian squeeze, browser Google Chrome 15.0.874.106 I use the hosts file to block unwanted sites, especially ad sites, from loading into the browser. In Iceweasel/Firefox you can block "unable to ...
1
vote
2answers
5k views

Can't map certain port and path with hosts file

On my localhost I'm trying to map http://127.0.0.1:8888/site/ to www.test.dev. Hosts file is below. When I load http://127.0.0.1:8888/site/ I see what I want but for www.test.dev I just see Firefox's ...
0
votes
1answer
926 views

VMware NAT doesn't seem to look at my hosts file

I'm running two VM's in VMware Workstation 7: My primary work VM (hostname main), runs Ubuntu 11.04. Uses VMnet0, which I configured to use NAT, and a Debian-based appliance (hostname server), also ...
0
votes
1answer
537 views

Automatically change /etc/hosts on OS X 10.6

I edit /etc/hosts as a first line of defense to stop me going to certain distracting sites during the working day. Ideally I'd like to have two versions of hosts and a cron job that switches them ...
2
votes
2answers
13k views

How to reset hosts file back to default?

How do I reset my hosts file back to default? Windows 7 Ultimate 32bit C:\WINDOWS\system32\drivers\etc
12
votes
2answers
5k views

Simulate manipulation of the etc/hosts file in Google Chrome

How can I set up Chrome to reference hostname lookups locally and not from the standard etc/hosts file? When debugging a website, it's sometimes useful to set up entries in ...
3
votes
1answer
91 views

How can I view different internally hosted websites, set up as virtual hosts?

I have an old machine that I've converted into a web server. I'm wondering what the best way to make the websites viewable on the internal network, without using a proxy. I experimented with BIND, ...
2
votes
1answer
332 views

Blocking sites with Windows HOSTS file

The article http://lifehacker.com/146448/geek-to-live--ban-time+wasting-web-sites recommends editing the Windows HOSTS file in c:\windows\system32\drivers\etc as a way to block certain websites. I ...
3
votes
2answers
1k views

How can I redirect HTTP requests to use HTTPS?

Is it possible to automatically redirect HTTP to HTTPS? Can I amend my host file in such a way that when I visit http://www.hsbc.co.uk it will redirect me to https://www.hsbc.co.uk? or is there ...
1
vote
1answer
699 views

Point an URL to a local html-page via hosts file

I want to surprise myself with a picture of an evil looking monkey every time I access Facebook by habit or rather by addiction. Therefore I added the following lines to /private/etc/hosts: # Block ...
1
vote
0answers
45 views

Software for editing HOSTS file in windows [duplicate]

Possible Duplicate: Editing the HOSTS file Is there a software which allow you to nicely edit hosts file in Windows? For instance, it should allow searching, and will display information in ...
0
votes
2answers
5k views

How to auto-redirect browser URL to another page?

What I want: When users type a certain URL, say, reddit.com or cracked.com, that they get automatically redirected to another site... say khanacademy.org or something. I am volunteering at my local ...
10
votes
5answers
11k views

How does localhost 127.0.0.1 work?

I found some articles related to this, but they were not sufficient for me. I want to know how the localhost works and why is it the same on many different machines? How does the localhost block the ...
1
vote
5answers
1k views

Why does this line in the hosts file not work to block access to this site?

I've tried adding the following line to my hosts file in Windows 7: 127.0.0.1 nytimes.com The hosts file is located in: C:\Windows\System32\drivers\etc\ The idea is to block access to the New ...
0
votes
1answer
683 views

DatabasePath Registry Entry Not Working in Windows 7

I’ve set the HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DatabasePath registry entry in Windows XP and it works as expected; the system loads and uses the HOSTS file in the directory I’ve ...
1
vote
1answer
1k views

Hostname Aliases in XP Pro

In XP Pro how can I create a local alias for hostnames of some other computers on the domain? When I created an entry in any of hosts, lmhosts, or lmhosts.sam, I can ping a computer with the alias, ...
2
votes
3answers
147 views

How dangerous is it to translate IPs directly via hosts in Windows

Sorry for the inconvenience, as English is not my native. I use hosts to access some websites as DNS is polluted. My question is, take www.google.com as an example. If I am successfully social ...
3
votes
4answers
3k views

Expected behavior with duplicate NT hosts file entries?

I know that you shouldn't have duplicate entries in your Windows NT hosts file, windows\system32\drivers\etc\hosts, but what is the expected behavior if you have them? You can have multiple entries ...
1
vote
1answer
460 views

Automatically update ip-address in hosts file?

My development environment is Ubuntu guest OS inside VMWare Player with Windows 7 as the host OS. I edit the hosts file in windows to point http://dev.mydomain.com to the ip-address of my VM so that ...
2
votes
2answers
1k views

My hosts file is broken (windows won't read it)

I have Windows 7 Pro 64 bit and it won't read the hosts file ! I've googled around for quite a long time but I can't fix it, maybe someone here can help me. I can't see the .txt extension on the ...
9
votes
4answers
8k views

Bash: lookup an IP for a host name, including /etc/hosts in search

Ubuntu 10.10+ In my script I need to lookup an IP for a given host name. If that name is listed in /etc/hosts, then command should print IP from /etc/hosts, not from DNS server. What commands I ...
4
votes
2answers
5k views

How to reroute all traffic using hosts file?

Is there a way to redirect all traffic to one IP in the hosts file? If not, how else could i achieve this?
0
votes
1answer
969 views

Changing Windows 'hosts' file in guest OS under Parallels Desktop 6 on Mac

I am running Windows 7 in a Parallels Desktop 6 on Mac. On the mac, I use /etc/hosts: 127.0.0.1 mysite and it works fine; I can type mysite in the URL box and the website will display. What I ...
2
votes
1answer
2k views

IE ignores hosts file; works in Firefox

I've edited my hosts file in a Windows 7 VM, but it doesn't work in IE. It works with Firefox, though. I hope this itemized list will help more than a verbose description. Environment Windows 7 in ...
0
votes
1answer
590 views

Tweak hosts file to avoid issues with duplicate machines in a workgroup

I am a software trainer. Training facilities clone a master image onto multiple machines for the students. Previously, we used to name these student machines S1, S2, S3, etc. The downfall to this, ...
2
votes
1answer
806 views

can't override name resolution for firefox on Ubuntu

I need to override the name resolution for a given domain name for testing purposes in my browser (Firefox) on Ubuntu, so that when I write "www.agivendomain.org", it will point to a given IP that I ...