til/Applications/Network/OpenVPN.md

953 B

OpenVPN

Distribution Package
Arch Linux openvpn
Ubuntu openvpn

Read update-systemd-resolved.

Distribution Package
Arch Linux openvpn-update-systemd-resolved (AUR)
Ubuntu openvpn-systemd-resolved

Start and enable service:

systemctl enable --now systemd-resolved.service

Edit client.ovpn:

script-security 2
setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
up /etc/openvpn/scripts/update-systemd-resolved
up-restart
down /etc/openvpn/scripts/update-systemd-resolved
down-pre

Connect with factor authentication and start as a dameon:

sudo openvpn --config /path/to/client.ovpn \
    --auth-user-pass --auth-retry interact \
    --daemon