Following this guide: https://www.qubes-os.org/doc/vpn/
# To override DHCP DNS, assign DNS addresses to 'vpn_dns' env variable before calling this script;
# Format is 'X.X.X.X Y.Y.Y.Y [...]'
I’m not sure how to do this. I overwrite /etc/resolv.conf with the proper DNS addresses and the VPN works. However, when I restart the appVM, NetworkManager overwrites resolv.conf
I’ve tried editing /etc/NetworkManager/NetworkManager.conf by appending
dns=none
rc-manager=unmanaged
However this file is overwritten too after restarting appVM.
I’ve tried protecting both of these files with:
sudo chattr +i /file/path/name.type
This does nothing to detour NetworkManager from:
# Generated by NetworkManager
Changing my files.
Side note, https://github.com/QubesOS/qubes-issues/issues/5071 … Also according to the Qubes docs:
#!/bin/bash
VPN_CLIENT='openvpn'
VPN_OPTIONS='--cd /rw/config/vpn/ --config openvpn-client.ovpn --daemon'
su - -c 'notify-send "$(hostname): Starting $VPN_CLIENT..." --icon=network-idle' user
groupadd -rf qvpn ; sleep 2s
sg qvpn -c "$VPN_CLIENT $VPN_OPTIONS"
When I comment
# su - -c 'notify-send "$(hostname): Starting $VPN_CLIENT..." --icon=network-idle' user
after appVM startup the message appears connection established. However this does nothing to resolve the DNS addresses being overwritten.
Thank you for any input!