Hosts file ignored

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
OpenVpn Newbie
Posts: 1
Joined: Thu Mar 18, 2021 3:03 pm

Hosts file ignored

Post by acblack » Thu Mar 18, 2021 3:05 pm

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?



OpenVPN User
Posts: 46
Joined: Fri Jun 10, 2011 12:03 am

Re: Hosts file ignored

Post by luckman212 » Sat Mar 27, 2021 2:13 am

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.

Post Reply