19
4
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 configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhostage
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 localkur.com
Pinging localkur.com returns
ping: cannot resolve localkur.com: Unknown host
I have restart the system, clean the cache using these commands
sudo killall -HUP mDNSResponder;
sudo discoveryutil mdnsflushcache;
sudo discoveryutil udnsflushcaches;
Reopen the file in different text editing programs, vm, sublime etc.
Double checked if space or tab (or double space or double tab) - tested with all possibilities.
Also monitor the file with this command
sudo fs_usage | grep "/etc/hosts"
And got that result when refreshing the browser or saving it with sublime
12:23:35 open private/etc/hosts 0.000019 Google Chrom
12:23:36 open private/etc/hosts 0.000019 Google Chrom
12:23:41 stat64 /private/etc/hosts 0.000022 Sublime Text
12:23:43 stat64 /private/etc/hosts 0.000019 Sublime Text
12:23:45 stat64 /private/etc/hosts 0.000019 Sublime Text
12:23:45 open /private/etc/hosts 0.000019 Sublime Text
What am I missing ?
Why is this file ignored ?
How to enable it again ?
What are checked lines in
System Preferences > Network > Advanced ... > Proxies
? Anything special? – FarazX – 2017-03-22T11:07:44.690the file might be corrupted/damaged, it has to be an ascii file - why don't you recreate it? – 13dimitar – 2017-03-22T11:15:50.800
@FarazX there is "Bypass proxy settings for these Hosts & Domains:" and the value is "*.local, 169.254/16" – T1000 – 2017-03-22T12:16:41.943
@13nilux how to recreate it properly ? – T1000 – 2017-03-22T12:16:47.617
with
nano
- move do old file to /etc/oldhosts, create a new file with nano, populate it with the values of the old file and save it as /etc/hosts – 13dimitar – 2017-03-22T12:29:04.013@13nilux dude ! You are genious! Apparently something happened to the file ... and now is ok! Can you please make it like normal answer so I can upvote you! Thanks – T1000 – 2017-03-22T13:11:08.603