Adding following lines into the .ovpn file before I import it to Network Manager on Ubuntu fixed DNS leak with my VPN connection established by NetworkManager.
script-security 2 up /etc/openvpn/update-resolv-conf down /etc/openvpn/update-resolv-conf
These lines should be added below the lines of initial commands and before the lines of certificates.
I’m a US-based software engineer with a background in law. I share mostly practical tech notes here for my future self and anyone who finds them useful.
One of the things I’ve built is Masterlist: Focus & Tasks, a privacy-focused, local-storage-only task manager that offers focus tracking tied to tasks and projects, compatible with the Pomodoro technique.
It is claimed that security is weakened by “script-security 2”. Please be prudent and do research before using this (and any) method.
BTW, I don’t have any DNS leak issue in default debian 9 & openvpn installation.