1
vote
1answer
213 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 ...
0
votes
2answers
267 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, ...
0
votes
1answer
117 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 ...
-1
votes
1answer
72 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
57 views

Custom Hosts file entry resolves in browser but not when pinged

I have a hosts entry to redirect app-dev/ to my application server. This resolves correctly in the browser but when I try to ping app-dev/ or ssh into it, neither can resolve the name then. The only ...
2
votes
2answers
3k views

How do I redirect a domain to another domain locally?

My /etc/hosts file looks like this: 127.0.0.1 localhost 10.20.7.67 testsitealpha.dev othersite.dev testsitebeta.dev The first two work. The last one doesn't. Why not? How do I make it ...
0
votes
1answer
518 views

Network Manager overriding /etc/hosts file

I believe the network manager service on Oracle Linux 6 is causing problems for the clouder-scm-agent which is running on my machine. The clouder-scm-agent starts up on the server ip it resolves from ...
1
vote
4answers
2k views

Why do we need hosts file?

DNS resolves the domain names to IP address then why do we need hosts file in our machine with domain name -> IP address mapping? One disadvantage is that the ip address could change. Is there any ...
2
votes
5answers
2k 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 ...
2
votes
1answer
3k views

How to add multiple IPv6 address for single host in /etc/hosts?

I want that a name should be resolved with multiple IPv6 addresses. I don't have access to a DNS server and I don't want to run a demon for that purpose. I want to add the entry in /etc/hosts and it ...
1
vote
1answer
1k views

IPv6 local address in hosts file

I have set up a local domain on my Apache server. Then I added the following line in my /etc/hosts file ::1 exampledomain.local After I trying to navigate to it, (I tried ...
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 ...
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 ...
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 ...
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 ...
0
votes
2answers
431 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.
3
votes
2answers
1k 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
271 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, ...
2
votes
2answers
9k 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 ...