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

12
votes
1answer
2k views

Could I access a blocked website via a virtual machine if the host OS has the web address blocked in its hosts file?

I was going through this Net Nanny article that mentioned about the various ways its web filter could be bypassed by kids. Among other methods, I saw this: One way that teens can get around the ...
1
vote
4answers
54 views

Blocking a site from myself and redirecting

I've tried editing "C:\Windows\System32\Drivers\etc\hosts" by adding: 127.0.0.1 websitetoblock.com But I can still access the website. Ideally I want to be redirected to a URL of my choice if I try ...
0
votes
1answer
7 views

Where does Gas Mask store its data on OSX?

I use Gas Mask to manage my hosts file on OSX. Where does it store its data?
1
vote
3answers
133 views

Block all websites in Windows 8, except for 3

I would like to create a whitelist of 3 websites on a Windows 8 machine. All other websites would be blocked. This environment is not managed by a server, these will be just 2 independent boxes. One ...
22
votes
6answers
41k views

Editing Hosts File in Windows 8

I'm trying to edit my hosts file in Windows 8 Pro. When I open C:\Windows\System32\Drivers\etc\hosts in notepad++ or any other text editor, make changes and attempt to save, I get a dialog that tells ...
0
votes
0answers
21 views

Check local hosts file (Win7) and proxy.pac

I have two groups of computers at the school: 1) computer lab, and 2) anywhere else. These are all Windows 7 machines. Up to now, I've had two versions of the Window's hosts file depending on which ...
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 ...
0
votes
0answers
23 views

Additional password for hosts file on mac

Is it possible to set up an additional password for changing the hosts file on mac? When i use the command: sudo nano /private/etc/hosts I have to use the admin password to enter the hosts file. ...
0
votes
1answer
34 views

Block specific url paths

I want to block a path (eg http://superuser.com/megasupersecret), but not the whole domain (http://superuser.com). In the host file, i've tested like this: 127.0.0.1 ...
0
votes
0answers
138 views

How do i make Chrome use an IPv6 address from my hosts file?

I have a Windows 7 machine that's running Ubuntu in a VM. The VM has an interface configured as an IPv6-only, host-only network. The network is statically set up, and all that seems to be working. ...
0
votes
2answers
360 views

Firefox not taking note of /etc/hosts?

I've set foo.com to 127.0.0.1 in my /etc/hosts file in (located here on Windows: C:\Windows\System32\drivers\etc\hosts). Though Chrome loads foo.com with the one hosted locally on port 80, Firefox ...
2
votes
5answers
14k views

With Windows 7, why is an entry in the hosts file not working?

I updated some entries in the hosts file at C:\WINDOWS\System32\drivers\etc. As a test, I decided to make Google point to 127.0.0.1. # Additionally, comments (such as these) may be inserted on ...
1
vote
1answer
171 views

Tracking down edits to my /etc/hosts file

Every hour at :49, my hosts file is being replaced with the following: # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file ...
10
votes
4answers
3k views

Hosts file for Chromebook?

Is there a way to modify the hosts file in Chrome OS? ­­/etc/hosts The file is read only, so trying to modify it using sudo vim does not work. I have read that disabling root filesystem ...
0
votes
1answer
106 views

accessing remote server with name instead of ip address and port number

I have question regarding accessing my web application with some name,which is deployed on remote server. Currently, I using following URL http://160.110.67.181:8080/myapp So, I'm wondering ...
0
votes
2answers
32 views

Editing the OS X hosts file with a one-time password

I was wondering if there was a way to edit the host file using a "throwaway" password. I want to prevent myself from entering certain websites, but OS X doesn't not have a good alternative for Cold ...
0
votes
1answer
88 views

Windows - make hosts file affect ICS

I am running an Ad Hoc Wi-Fi network (Hosted network using Microsoft Virtual WiFi Miniport Adapter) on my PC. I used ICS (Internet Connection Sharing) to link my existing Wi-Fi connection through to ...
1
vote
3answers
53 views

What is writing to my hosts file?

I've got an odd situation where I'm emptying out my hosts file but when I ping something that used to have an entry in the hosts file the hosts file gets populated with the entries that I've just ...
2
votes
2answers
12k 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
1
vote
1answer
54 views

Local Network web site access with multiple computers

I have a local site running through my server computer located at 192.168.2.111 (port 80) on my network. I'm currently running the site using XAMPP. In order for the site to be accessed, I have ...
26
votes
8answers
4k 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 ...
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
1answer
99 views

hosts file handles specified domain but not a longer path

Trying to resolve a website domain to localhost for development purposes. I am developing on a Wordpress Installation which has some inherent hardcoded redirects to the domain it is installed on. So I ...
0
votes
2answers
138 views

Editing /etc/hosts to use domain name instead of ip address

I have a web service running at http://192.168.1.2:5000/, I want to replace it with a typical domain name, in /etc/hosts, I'm doing something like 192.168.1.2:500 http://www.mydomainname.com but, ...
4
votes
1answer
3k 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?
0
votes
1answer
166 views

How to add/remove lines from the hosts file

I'd like to add and remove hosts file entries at a regular interval. I believe the easiest way to do this is powershell and task scheduler. So how do you add/remove hosts file entries?
2
votes
2answers
278 views

Why is Chromium bypassing /etc/hosts and dnsmasq?

I'm using hostsblock together with dnsmasq on Arch Linux to block some websites, one of them is facebook.com and www.facebook.com. I know everything is working properly because a simple ping to ...
1
vote
1answer
13k 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 ...
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 ...
0
votes
1answer
67 views

Sinkhole Planning

I am currently planning on setting a network sinkhole in my... network. I have a list of sites that I want to block, around 300k of them. What is the recommended way to do this. My computer is its own ...
0
votes
0answers
34 views

redirect from one site to another [duplicate]

To avoid spending time on the internet I decidet to block several time wasting web sites I added rule redirecting several pages to localhost changine file C:\Windows\System32\drivers\etc\hosts I ...
1
vote
4answers
4k 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 ...
1
vote
3answers
353 views

Easy way to view a website at a different IP than associated with hostname?

Some background — WordPress is really annoying in terms of what hostname you access it from, which makes creating testing environments rather painful (That is, I could create a subdomain for staging, ...
0
votes
0answers
89 views

Changing hosts file in Mac OS X does not take effect

I have tried to alter the hosts file adding my own entries to access sites that are being blocked by my ISP. When address the entries as follows 194.71.107.82 totallylegalsite.se After adding ...
0
votes
3answers
2k views

Why does localhost not work in Windows 8.1, but 127.0.0.1 does?

I have a HTTP server running on port 9876. I put http://127.0.0.1:9876/ into Chrome and the page loads instantly. I put http://localhost:9876/ into Chrome and the page never loads. I have never ...
2
votes
5answers
1k views

Chrome does not follow hosts file

I have custom domains set up for internal web site testing in my /etc/hosts file. I try to access them in Chrome, and I get routed to a Google search instead. But when I ping the domains, they ...
0
votes
2answers
97 views

My Mac is not responding for this own IP, but it's ok for everything else

My Mac has the IP 192.168.1.123 and this network settings: IP: 192.168.1.123 Net Mask: 255.255.255.0 Router: 192.168.1.3 DNS: 208.67.222.222, 8.8.8.8 and apache answer correctly if I request ...
3
votes
2answers
6k views

Run as administrator from command line on Windows 8

I am trying to run Notepad as admin so I can edit my hosts file from the command line. I have tried runas /user:(myusername)\administrator "notepad c:\windows\system32\drivers\etc\hosts" I then input ...
1
vote
1answer
166 views

port number in acrylic dns proxy hosts file

I want to map a url as follows: 127.0.0.1:8080 *.devserver.com but windows host file neither support port number nor wildcards.So I am using acrylic dns proxy which supports wildcard.So following ...
0
votes
1answer
89 views

DHCP fallback based on /etc/hosts lookup of your hostname

I have a Kubuntu box (12.04) which usually gets its IP via DHCP. However, it also has a hosts file with some entries in case the DHCP+DNS server fails. Now, if there is no DHCP available, I want the ...
0
votes
1answer
92 views

With a hosts file Chrome takes too long to realize that 0.0.0.0 isn't real

So i have a hosts file with many links set to 0.0.0.0, and a lot of times when i go to websites, Chrome is taking too long "waiting for googlesyndication.com" (ad sites that i put in the hosts file) ...
0
votes
1answer
79 views

How to make local DNS for pointing domain *.local to localhost?

I'm developing websites and I use xampp which is configured to automaticly point some type of domains to xampp main directory. For example: When I go to site1.local xampp is displaying page located at ...
2
votes
2answers
409 views

Which leads to faster browsing, an ad blocker or an edited hosts file?

I recently came across the MVPS hosts file and became fascinated with the concept of blocking ads upstream from your browser. I don't know much about how quickly adblockers work, nor how quickly the ...
11
votes
2answers
4k 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 ...
-1
votes
1answer
70 views

When editing hosts file with vi , the added line gets repeated ad infinitum

Sometimes when I edit the hosts file by adding a new line, and when I do Esc, :, W, Q to save and exit, that line gets repeated infinite times in the file, and then gets saved. What am I doing wrong? ...
0
votes
0answers
69 views

How to expose a IIS website outside the domain

I have been programming remotely over VPN on my dev machine which is running Windows server 2003. My dev website is hosted on IIS 6 and can be accessed internally within the domain like ...
0
votes
0answers
76 views

Hosts file keeps being ignored in Windows 7

Something keeps happening to my hosts file (%SystemRoot%\System32\drivers\etc) which means that Windows 7 ignores it. I use it as part of the process of creating Virtual Hosts for WAMP e.g. ...
1
vote
0answers
3k views

windows 8.1 update disabled local website for IE

I use the Windows hosts file to resolve domains for websites on my local IIS. It worked great under Windows 8. I just updated to Windows 8.1 and none of my local sites will resolve in IE11. Even ...
8
votes
3answers
1k views

How do you edit hosts file on Windows 7

I'm trying to edit the hosts file (C:\Windows\System32\drivers\etc\hosts), because I want to setup a local redirect for my website (like I've always done in XP). However, I can't save the changes! I ...
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 ...