Monday 22 July 2019

NordVPN access from RHEL 8

We can use OpenVPN to get access to NordVPN endpoints, EPEL has an NMCLI plugin to do this.
RHEL 8 doesn't yet have a dedicated EPEL repo so we can temporarily use the RHEL 7 repo.


  • yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  • yum install NetworkManager-openvpn

Pull down all the NordVPN endpoint OpenVPN templates
  • wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip
Pick the one(s) you want to connect with and import it into NetworkManager
  • nmcli connection import type openvpn file uk1089.nordvpn.com.udp.ovpn

It needs modifying to include your NordVPN username & password
  • nmcli connection modify uk1089.nordvpn.com.udp +vpn.data "username=user@email.com,password-flags=0" vpn.secrets password="MyPassword"
With SELinux enabled you'll need to restore some SELinux contexts on the directory nmcli stores the certs in
  • restorecon -R /root/.cert

To start / stop a connection:
  • nmcli connection up uk1089.nordvpn.com.udp
  • nmcli connection down uk1089.nordvpn.com.udp

To show available connections:
  • nmcli connection show

To delete a connection:
  • nmcli connection delete uk1089.nordvpn.com.udp

If you want a user other than root to be able to initiate VPN connections, create a polkit file:
/etc/polkit-1/localauthority/50-local.d/50-nmcli-remote-access.pkla
[Remote nmcli SSH access]Identity=unix-user:paulAction=org.freedesktop.NetworkManager.network-controlResultAny=yesResultInactive=yesResultActive=yes