The context:

I have a raspberry pi headless torrent box. It downloads torrents to a local SMB share which is mounted with autofs. As I download torrents I also use a VPN. It is set up with OpenVPN and it updates the resolv.conf file with the VPN's DNS servers after (dis)conneting. After this, I can't resolve any local hostnames, and thus autofs can't mount the share.

Is there a way to keep the resolution of the local hostnames?

  • This can be normal behaviour for a full tunnel VPN. – Rui F Ribeiro Apr 30 at 22:24
  • Have you got lines in your OpenVPN client configuration file that look like this, up /etc/openvpn/update-resolv-conf? If so, comment them out. – roaima Apr 30 at 22:28
  • I would add whatever hostnames I need to /etc/hosts with the local IP address and leave the openvpn config as-is. – wurtel May 1 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.