Page 1 of 1

Hosts file ignored

Posted: Thu Mar 18, 2021 3:05 pm
by acblack
I have noticed that when connected to the VPN the local hosts files on a Mac are ignored. Previously this was not the case, but I'm not aware of any changes to the client or server configuration.

To reproduced the issue I can do the following:
- Ensure the VPN is not connected
- Add a line to the hosts file to make it point at an invalid IP (to make it error)
- Browse to the domain added to the hosts file and confirm it loads the site from the IP in hosts (which subsequently displayed an error)
- Hard refresh several times and use incognito to ensure it isn't cached
- Connect to the VPN but change nothing else
- Hard refresh the domain and the domain loads the live site from the IP present in DNS.

Are there any settings on either the client or server side that might cause the hosts file to be ignored while the VPN connection is live?

Thanks.

Andrew.

Re: Hosts file ignored

Posted: Sat Mar 27, 2021 2:13 am
by luckman212
Hmm I don't think Incognito mode has any impact on your local DNS cache. Use `sudo killall -HUP mDNSResponder` instead...

You could try Viscosity to solve these DNS issues... it has many more controls, toggles, and overrides that you can tweak the connection with.