2ndalpha / gasmask

Hosts file manager for OS X
3.73k stars 252 forks source link

GasMask seems to mess up hosts entries (10.14.6) #173

Closed JayBrown closed 5 years ago

JayBrown commented 5 years ago

I'm using GasMask to combine my original hosts file, which has a couple of individual additions, with a remote hosts file, namely this one: http://sbc.io/hosts/alternates/gambling/hosts (Steven Black adware/malware + gambling blocking).

Now GasMask correctly installs & updates the remote hosts file, correctly combines my original local hosts file and the remote one, but the actual /private/etc/hosts only contains the following:

Local/hosts.original
Remote/SteveBlack.unified.gambling

Since using a combined hosts (original + remote), none of the local domain names including localhost are resolving anymore.

For example, I have a Fritz!Box AP, and the routing is

192.168.178.1   fritz.box
169.254.1.1 fritz-sos.box

None of these work anymore. Problems also occur when I address localhost, e.g. with the nc CLI: localhost is unknown, and it will only work, when I use 127.0.0.1 instead.

What could be the problem here? It seems that it has something to do with using a combined hosts file, comprised of the original local hosts and a remote one. Help would be appreciated.

JayBrown commented 5 years ago

Solved. The problem was actually that both the remote hosts file and the local host file had something like

127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

And you can only have this once, in one of the hosts files you're combining.

Once I modified my hosts files accordingly, everything works again. (At least so it seems atm.)