Questions tagged [hosts]
host is any machine or computer connected to a network and can offer information, resources, services and applications to users or other nodes in the network.
389
questions
1064
votes
17
answers
1.1m
views
How to clear/flush the DNS cache in Google Chrome?
As you probably know Google Chrome has its own internal DNS cache. Is there a way to clear it without having to wait for the time out or close the browser?
290
votes
11
answers
876k
views
Remove key from known_hosts
I built several virtual machines during the last few weeks. The problem is, the .ssh/known_hosts gives me the Man in the middle warning. This happens because another fingerprint is associated with the ...
170
votes
7
answers
112k
views
Don't add hostkey to known_hosts for SSH
I want to connect to a host via SSH but I don't want the hostname to be added to my ~/.ssh/known_hosts.
How can I do that?
90
votes
5
answers
218k
views
Using wildcards in names in Windows hosts file
Is there a way to create a wildcard domain in the Windows hosts file.
I tried this
xxx.xxx.xxx.xxx *.somedomain.com
This does not work, is there maybe some other syntax I should use?
I am ...
42
votes
1
answer
78k
views
What's the Windows equivalent of "/etc/hosts"? [duplicate]
I can block my little brother from accessing a website on my Mac by adding the following line to my "/etc/hosts" file.
127.0.0.1 someaddictingwebsite.com
Do Windows systems have a file ...
38
votes
1
answer
85k
views
How to alias a hostname on Mac OSX
In a nutshell, I would like to be able to open a browser and open local.example.com but it actually loads http://localhost/path/to/example.com/
I am using Mac OSX 10.5, and not afraid to get my hands ...
29
votes
2
answers
120k
views
How do you add an IP address/hostname pair to the host file in Windows 7?
Our network IT people hate us, so our IP addresses are not entered into the DNS lookup automatically if we run a non-Windows OS. How do I get my Windows 7 machine to find the non-Windows OS ...
27
votes
4
answers
43k
views
Adding a line into the hosts file, getting permission denied when using sudo - Mac
I'm trying to add a line into the hosts file on my Mac by executing a one line command on the terminal.
I thought this would be easy using sudo, but it returns "permission denied" when I try to add &...
27
votes
8
answers
72k
views
OSX Sierra hosts file is ignored
For some reason, two days ago my hosts file started being ignored.
I'm using Mac with Sierra OSx .
This is the current content of the /etc/hosts file
##
##
# Host Database
#
# localhost is used to ...
26
votes
8
answers
31k
views
Does Firefox ignore the hosts file? How to make Firefox honor the hosts file
I'm using Firefox browser in Ubuntu 18.04. I made an experiment where I want some domain names to be resolved to another IP address than their actual one. Firefox seems to ignore the IP in the hosts ...
25
votes
3
answers
10k
views
Remove ads in Viber for PC [closed]
How do I disable ads in Viber for PC - version 11.4 (2019). The hosts file trick no longer works (the following one):
127.0.0.1 ads.viber.com
127.0.0.1 ads.aws.viber.com
127.0.0.1 ads-d.viber.com
...
16
votes
3
answers
64k
views
Windows hosts: how can I redirect HTTPS site?
I have the following in my C:\Windows\System32\drivers\etc\hosts:
127.0.0.1 example.com
It works when I use: http://example.com
But does not work when I use: https://example.com, which gives error ...
15
votes
2
answers
23k
views
windows 10 hosts file entries been commented out
Windows 10 is commenting out my hosts file entries. This happens periodically so every 1 hour.
Although I manage to save the changes but they will be commented out after around 1 hour.
I never ...
13
votes
1
answer
45k
views
How to change IP address to point to localhost?
A sandbox enviroment of a web app is reachable directly by an IP address: http://<my_ip_address> without a login name.
Is there a way to make a virtual host in my local machine, named as <...
13
votes
3
answers
22k
views
How come hosts file redirection fails?
I am trying to redirect google.com to my local machine for fun and learning with this /etc/hosts file on my Mac.
127.0.0.1 www.google.com
However, www.google.com still maps to the Google home page ...
12
votes
2
answers
2k
views
What does this entry in hosts-file mean: 192.168.3.2 NPI2A54EA
I took over a Windows 7 PC from a developer and in the hosts file there was this entry:
192.168.3.2 NPI2A54EB
Does anybody know why this would be entered there and if this could be a virus or would ...
12
votes
1
answer
16k
views
How to list all DNS names pointing to an IP?
I know – for example – that there are two DNS names for an IP. However nslookup ip only returns one record.
How do I get all the records for an IP?
12
votes
2
answers
4k
views
Is there a utility to ping a server using aliases in ssh config (instead of /etc/hosts)?
I'm trying to standardize my server aliases across projects by linking together ssh config files that I can keep under version control.
I'd like to be able to just define machine aliases along with IP ...
12
votes
3
answers
25k
views
Hostname redirection using Hosts file
We can use C:\WINDOWS\system32\drivers\etc\hosts file to map hostname with IP addresses like this
127.0.0.1 localhost
But is it possible to assign one hostname to another like this?
...
11
votes
2
answers
32k
views
Can a router map a URL to a local ip?
I'm setting up a facility with many different computers where I don't have access to their hosts files. How would I map test.com to a local server without using the hosts file? Can this be done using ...
11
votes
3
answers
5k
views
Mac OS X "hosts" file, can I include other files with it?
I am working on some automation scripts to configure my network settings, hosts file contents, and /etc/resolver files, when accessing different networks I frequent between.
There are some ...
11
votes
2
answers
12k
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 ...
10
votes
5
answers
23k
views
DNS lookup fails but nslookup works
I have DNS lookup problems on my internal network. I'm using an internal DNS server with the IP 192.168.1.254.
If I use nslookup everything works like it should:
>hawk:~ user$ nslookup ...
9
votes
4
answers
11k
views
Unable to block a website through System32/drivers/etc/hosts
I am trying to block social media and news websites on my local machine (Windows 7).
I added the below lines into my hosts file:
127.0.0.1 www.thatstamil.com
127.0.0.1 www.facebook.com
In that ...
9
votes
2
answers
84k
views
How do I set an alias name in the hosts file?
I have a production server, on which three different application are running. I need to configure aliases for that server, according to which application needs to be accessed by the user.
How do I ...
9
votes
1
answer
3k
views
Host-based snakeoil certificates in Ubuntu
How to create snakeoil a certificate and a key for a given host in Ubuntu?
9
votes
2
answers
8k
views
Should I restart a service or a interface to apply Windows' hosts configuration file changes?
After I change the file
%SystemRoot%\system32\drivers\etc\hosts
Should I restart something?
8
votes
3
answers
16k
views
Resolving UNC path using hosts file
I'm having a problem accessing a UNC path in Windows Server 2008 using the hosts file.
My hosts file looks like:
10.x.x.x server_1
When trying to access the unc path:
This works:
\\10.x.x.x\...
7
votes
5
answers
11k
views
HOSTS File Edit in Windows 7 Not Effective - Pinging URL Still Shows Original IP Address
I've edited my HOSTS file on my Windows 7 Ultimate PC to re-route a couple of URLs so that they point to 127.0.0.1, but after saving the file (and re-opening to verify the changes were written) and ...
7
votes
2
answers
9k
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 67.207.136....
7
votes
4
answers
25k
views
Windows 7 stopped using the 'hosts' file for DNS resolution
I am running Windows 7 Home Premium 64-bit. Starting today, I noticed that DNS resolution is not reading my %SYSTEMROOT%\System32\drivers\etc\hosts file. I say this because I added two new entries to ...
7
votes
5
answers
2k
views
Viable to virtualize my laptop?
I have a laptop that I'd like to run multiple operating systems on, at the same time. Specifically, I'd like to be able to boot up a Windows 7, if needed, a Windows XP, if needed, and a Ubuntu desktop,...
7
votes
2
answers
2k
views
How can I route a domain to my box at home?
I currently own my own domain, and have been using dyndns.com's "custom DNS" to allow me to redirect 'example.com' to my website at home, which is on a dynamic IP.
I've now switched over to a VPS ...
7
votes
3
answers
28k
views
Custom host file for Firefox
Instead of changing my host file I'd like Firefox to think my domain is on my own server while my other browser uses the real IP address. I used to edit my host files but that forces both browsers to ...
6
votes
1
answer
35k
views
How can I map multiple hostnames to localhost?
I'm testing an application on my PC, this application connects to various servers so I need to mimic that on my box.
How can I map hostnames to 127.0.0.1?
localhost already refers to 127.0.0.1, but ...
6
votes
3
answers
38k
views
How can I modify my hosts file? It is read-only and cannot be modified even as Adminstrator.
Does anyone know how to modify entries on the hosts file when it is marked as read-only?
I have tried unchecking the Read-only tick box, but I get an Access is Denied error, and I'm running as the ...
6
votes
2
answers
25k
views
How to block IP Address via Windows Host
I want to block access to a certain ip address via windows host.
This is the ip address 41.190.8.17. And this is the content of my host file.
# localhost name resolution is handle within DNS itself....
6
votes
5
answers
2k
views
ports and what they do
I am curious as to what a port number does. Are there specific port numbers for specific things?
I know there is port 80 and I heard of 8000 in passing. I don't know why they are called that and ...
6
votes
4
answers
4k
views
Map localhost to IP address on Windows XP & Internet Explorer 7+?
I'm trying to map 'localhost' to an IP address elsewhere on the network, say '10.0.1.1' for example. I've tried editing my hosts file, changing the entry from:
127.0.0.1 localhost
to
10.0.1.1 ...
6
votes
5
answers
5k
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 ...
6
votes
4
answers
8k
views
Block website on Windows without host file
Is it possible to block website on Windows without modifying hosts files? The reason I do not want to use it is that users need administrator options to modify it.
I need some easier way to block a ...
5
votes
3
answers
18k
views
How to alias a hostname?
Is it possible to keep a network alias - without specifying the IP address in the hosts file? For instance, I have abcd.efgh.com but want abcd -> abcd.efgh.com so that ping and ssh work as they ...
5
votes
1
answer
29k
views
Can a host file DNS entry point to multiple Ip addresses?
Can a host file DNS entry point to multiple Ip addresses ?
basically i want have to ad servers , but no balancer due to port issues , the solution i think is host file entry ,but can one dns point ...
5
votes
2
answers
11k
views
Is there a way to 'include' a separate file in /etc/hosts?
Is there any way to 'include' another file within the /etc/hosts file? Particularly I want to include a non-protected (-rw-rw-rw) file so I can easily edit it in something like TextMate without having ...
5
votes
3
answers
6k
views
hosts file and unblocked subdomains
I modified hosts file to block google.com and its subdomains but it blocks only the main domain name. It does not block the subdomains.
Windows 7 Starter
127.0.0.1 google.com
It blocks google.com ...
5
votes
2
answers
1k
views
In your ssh config is it possible to have one host entry for multiple machines on the same domain
I'd like to be able to do something like
Host *
HostName *.mydomain.com
...
So I can type something like
ssh test
ssh ci
ssh dev
Instead of having to type
ssh test.mydomain.com
ssh ci....
5
votes
2
answers
13k
views
http://localhost:3000 works, but http://127.0.0.1:3000 doesn't
I'm building a Rails application on my local dev machine. When running my local server, I can access http://localhost:3000 without a problem. However, when I try to navigate to http://127.0.0.1:3000, ...
5
votes
4
answers
4k
views
Redirect browser to different host and port
Background, Running windows 7, FF3.5, and am an admin. I recieve emails from an internal company service that has links. The problem is the links don't work from my office. If the resource is http://...
5
votes
2
answers
1k
views
Can one make a Macbook behave like a USB-Drive
Is there a Way to emulate an usb-drive with a Macbook? I do not mean to emulate usb drives on my macbook!
I would like to plug a double usb cable to my macbook and e.g. my TV. I want the TV to think ...
5
votes
4
answers
22k
views
VirtualBox host-only network, cannot ping host from guest
I have the following setup:
Host machine Windows:
IPv4 Address. . . . . . . . . . . : 192.168.0.103
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192....