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

0
votes
1answer
1k 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
541 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
16k 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
13
votes
3answers
8k 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
93 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
373 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
2k 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
877 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
6k 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
12k 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
2k 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
902 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
151 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
4k 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
666 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
2k 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 ...
10
votes
4answers
11k 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
6k 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
1k 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
734 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
957 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 ...
1
vote
1answer
209 views

Running two hosts files at the same time

I am developing on my local machine and I need to have a browser run on one host file and another browser run on a different host file. One browser would run a host file to redirect domain.com to my ...
1
vote
1answer
272 views

How can I disable connections to specific domains? [duplicate]

Possible Duplicates: Good free internet filter Using wildcards in names in Windows hosts file I'd like to block connections to specific domains. I know about the HOSTS file on Windows, ...
1
vote
1answer
217 views

Host File Information

I intend to change my organization IP CLASS from CLASS A or CLASS B for 250+nodes. I need to know if I can map a single host name for 2 different IP’s in the host file. For Example. 192.168.100.1 ...
4
votes
1answer
4k views

Windows hosts file equivalent on Mac?

I am doing a project and uploading to a clients test server, however they only have IP address to access and suggested editing my hosts file. I'm on a Mac, where is the hosts file?
1
vote
0answers
146 views

Hosts file in windows 7 [duplicate]

Possible Duplicate: Problem with the hosts file under windows 7 I'm using Windows 7 Pro. I'm trying to add a new entry to Hosts file. But that entry doesn't seem to work. Browse to ...
1
vote
4answers
5k views

Browsers ignoring hosts file

Until recently my browsers started to ignore my hosts file. I have Windows 7 operating system installed. 192.168.0.5 livesite.com I have tried: Clearing browser cache Issued "ipconfig ...
5
votes
4answers
2k views

Windows redirect traffic to different DNS name not fixed IP address (hosts file equivalent)

Using the Windows hosts file, one can redirect traffic for a domain to a specific IP address, e.g. domainA.com --> 127.0.0.1 I am looking for a SIMPLE way to do the same, but for a target domain ...
0
votes
2answers
719 views

What is Windows “hosts” file alternative for OSX?

I just got a Mac computer (OSx v10.6) to test my web site design. Web site is running on the local network, and in windows computers I use "hosts" file to map its network IP address to domain name, ...
1
vote
2answers
857 views

Global Hosts file WINDOWS [duplicate]

Possible Duplicate: Can I have Windows use additional HOSTS entries from a file server? How can I set up a global windows hosts file on my network. I have a server store the file on.
0
votes
1answer
241 views

Can I have Windows use additional HOSTS entries from a file server?

I have a network of computers and a server. I often need to edit the hosts file of all the computers to add a new entry or to change one. e.g. 192.168.1.101 temporary-internal-site How can I get ...
0
votes
2answers
6k views

Host file not working on Windows 7

Our ISP accidentally switched us from a static IP to DHCP (long story) and it might be another day or two before we get our static IP back. In the meantime I'm trying to just use a host file on my ...
3
votes
1answer
405 views

Hosts file - Many entries

I noticed Spybot - Search & Destroy adds almost 15k entries on the hosts file (C:\Windows\System32\drivers\etc\hosts) if you decide to immunize. Does this decrease the computer performance, ...
4
votes
7answers
6k views

My Hosts file broke: Ping request could not find host test

Here's my hosts(with a single entry): 127.0.0.1 test But it's not working any more: C:\Documents and Settings\Administrator>ping test Ping request could not find host test. Please check the ...
1
vote
1answer
16k views

Adding localhost entry to Windows\System32\drivers\etc\hosts file with port number

I have set up a local site under IIS 7.5 under port 900. to access it I should type localhost:900 in the address bar. I'm a little bit familiar with the System32\Drivers\etc\hosts file and I know I ...
2
votes
2answers
1k views

How to block a specific site's directory in windows?

How can I block a specific directory of a website as e.g. http://example.com/someSite unfortunately the hosts file is not an option since you can only block whole domains there and any "/" just ...
2
votes
1answer
2k views

Hosts file in Windows 7 screwed up!

I recently changed my Hosts file to block some websites in Windows 7. Now I think it is blocking lot of other sites that were not added to Hosts file. Is there any way to escape this? I tried to ...
0
votes
2answers
476 views

To improve my productivity: how to lock the /etc/hosts file on Linux with a passcode?

I would like to lock the /etc/hosts file somehow in a way that only someone else can unlock it, possibly using a lock code. I would then give the passcode to someone else. I'm running Ubuntu 10.10.
22
votes
3answers
30k views

What is the relevance of “fe80::1%lo0 localhost” in /etc/hosts?

Following are the entries in my /etc/hosts. I was wondering what is the last entry (fe80::1%lo0 localhost) for. 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost ...
27
votes
8answers
5k views

Browser with its own hosts file?

I have a number of staging and test servers that I need to constantly modify my hosts file to access (they depend on the domain name, so I have to change the hosts file to get them to work). I find ...
4
votes
2answers
2k views

why /etc/hosts don't effect to my firefox on Ubuntu 10.04?

I tried to block some hosts to load from them ads and scripts. for example in /etc/hosts: 127.0.0.1 web-visor.com 0.0.0.0 c1.web-visor.com Why after editing and saving the file, firefox (after ...
0
votes
1answer
276 views

After reset /etc/hosts, firefox stuck requiring authentication

I have a test site, which need authentication to access. The map between ip and domain is given in /etc/hosts. Today, the ip of the domain changed, so I modifid /etc/hosts. Then the bad thing happens, ...
3
votes
2answers
11k views

Why is a reboot not required after changing HOSTS file content

I was having a discussion with someone who asked me whether a Linux OS has to be rebooted when the hosts file is modified. From personal experience, on Windows I change the file but don't reboot and ...
2
votes
2answers
3k views

Ubuntu hostname problem

after updating to Ubuntu 10.10, the hostname settings are no longer correct. The content of the /etc/hosts is modified at each startup to something like: 127.0.0.1 mariusbotis ...
6
votes
2answers
3k views

Hosts file location in Windows 7

I know the hosts file should be under C:\Windows\System32\drivers\etc\ But for some reason, I don't have the etc directory there at all. In fact, I searched for "hosts" under C:\Windows and found ...
0
votes
2answers
530 views

Does the event log show when a Windows hosts file has been changed?

It seems like someone has been tampering with a hosts file on a client server (they have multiple sites hosted on their server which are managed by different users) Today one of our services stopped ...
1
vote
4answers
11k views

Why doesn't my HOSTS file redirect DNS in Windows 7?

I've modified the HOSTS file on my Windows 7 machine in exactly the same manner as I have in the past on my Vista and XP machines; however it has had no effect. How do you redirect URLs in Windows 7 ...