Template:VPN/Setup/install resolvconf
Update the package lists.
sudo apt update
Install resolvconf. [1]
sudo apt install resolvconf
Users preferring not to install resolvconf should read the footnotes. [2]
- ↑
/etc/openvpn/update-resolv-confusesresolvconf.resolvconfneeds to be installed for the lines beginning with script-security, up, and down to function properly. - ↑
1. In the
/etc/openvpn/openvpn.conffile, change the following text.script-security 2 up "/etc/openvpn/update-resolv-conf script_type=up dev=tun0" down "/etc/openvpn/update-resolv-conf script_type=down dev=tun0"
To the following. Remove or comment out the lines beginning with "up" and "down", and change the 2 to a 1.
script-security 1
2. Open file
/etc/resolv.confin an editor with administrative ("root") rights.1 Select your platform.
2 Notes.
- Sudoedit guidance: See Open File with Root Rights
for details on why using sudoeditimproves security and how to use it. - Editor requirement: Close Featherpad (or the chosen text editor) before running the
sudoeditcommand.
3 Open the file with root rights.
sudoedit /etc/resolv.conf
2 Notes.
- Sudoedit guidance: See Open File with Root Rights
for details on why using sudoeditimproves security and how to use it. - Editor requirement: Close Featherpad (or the chosen text editor) before running the
sudoeditcommand. - Template requirement: When using Qubes-Whonix, this must be done inside the Template.
3 Open the file with root rights.
sudoedit /etc/resolv.conf
4 Notes.
- Shut down Template: After applying this change, shut down the Template.
- Restart App Qubes: All App Qubes based on the Template need to be restarted if they were already running.
- Qubes persistence: See also Qubes Persistence

- General procedure: This is a general procedure required for Qubes and is unspecific to Qubes-Whonix.
2 Notes.
- Example only: This is just an example. Other tools could achieve the same goal.
- Troubleshooting and alternatives: If this example does not work for you, or if you are not using Whonix, please refer to Open File with Root Rights.
3 Open the file with root rights.
sudoedit /etc/resolv.conf
3. Comment out the nameserver.
#nameserver 10.152.152.10
4. Add the VPN provider's DNS server.
## Riseup.net OpenVPN DNS server nameserver 172.27.100.1
If Riseup is not in use, replace 172.27.100.1 with the virtual LAN IP address of the VPN provider's DNS server. If unsure, the VPN provider might provide it. To try to infer it, run
sudo routeafter successfully connecting to the VPN. The first destination default gateway should also function as a DNS server.5. Save and exit.
6. Optional: Prevent
/etc/resolv.confbeing overwritten by other packages like DHCP orresolvconf.Run.
sudo chattr +i /etc/resolv.conf
In order to revert this change, use -i.
Ignore the
/etc/resolv.confinstructions below. - Sudoedit guidance: See Open File with Root Rights