How To Install OVPN Client in Debian 12
Overview
This document outlines how to tweak the openvpn config file to get DNS working across the VPN pipe.
Install systemd-resolved helper scripts
After downloading the config, need to follow these instructions:
-
The system uses
systemd-resolved, so all you have to do is install the openvpn helper script forsystemd-resolvedviasudo apt install openvpn-systemd-resolvedor with these GitHub instructions
-
Update your
config.ovpnfile adding these lines:script-security 2 up /etc/openvpn/update-systemd-resolved down /etc/openvpn/update-systemd-resolved down-preThat instead of adding up and down of
/etc/openvpn/update-resolv-confto the conf. -
To prevent DNS Leakage, you should add this line to the end of the
config.ovpnfile (according to this systemd issue comment):dhcp-option DOMAIN-ROUTE .