Jeff M. Doyle Hi, I'm Jeff! LinkedIn Email

Install and configure NordVPN on Ubuntu

Using a VPN (Virtual Private Network) provides several key benefits across privacy, security, and access:

  1. Encrypts Your Traffic
    • All data between your device and the VPN server is encrypted, so eavesdroppers on public Wi-Fi can’t intercept sensitive info.
    • Protects against “man-in-the-middle” attacks and local network snooping.
  2. Hides Your IP Address & Location
    • Websites and online services see the VPN server’s IP instead of yours, making it much harder to trace your browsing back to you or infer your location.
    • Helps reduce profiling by advertisers and data brokers.
  3. Bypasses Geo-Restrictions & Censorship
    • Access region-locked content that might be blocked in your country.
    • Reach news sites, social media, or communication tools that might otherwise be censored.
  4. Thwarts ISP Throttling
    • Hides the type of traffic you’re sending, so ISPs that throttle specific data (like video) can’t detect it.
  5. Secure Remote Access
    • Connect safely to your workplace network from anywhere, accessing internal resources without exposing them to the internet.
  6. Improves Online Anonymity
    • Makes it harder for websites and ad networks to build a profile of your browsing habits over time.
  7. Adds a Layer Against Malware & Trackers
    • Built-in ad-blocking, malware protection, and tracker-blocking features help keep you safe from malicious domains.

Steps to install and configure NordVPN on Ubuntu

Prerequisites

  • Ubuntu 16.04, 18.04, 20.04, 22.04 or newer LTS
  • An active NordVPN subscription
  • Terminal access with sudo privileges

Method 1: Official Install Script (Recommended)

  1. Install curl or wget:
    sudo apt update
    sudo apt install curl    # or: sudo apt install wget
  2. Run the NordVPN installer:
    # Using curl
    sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
    
    # or using wget
    sh <(wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh)

    This script will:

    • Add the NordVPN APT repo & GPG key
    • Install the nordvpn package
    • Enable the nordvpn system group
  3. Add your user to the nordvpn group:
    sudo usermod -aG nordvpn $USER
    • Log out and back in (or reboot) to activate.

Method 2: Manual APT-Repository Setup

If you prefer to handle the .deb manually:

  1. Download the release package:
    cd ~/Downloads
    wget https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/n/nordvpn-release/nordvpn-release_1.0.0_all.deb
  2. Install the release package:
    sudo apt install ./nordvpn-release_1.0.0_all.deb
  3. Update and install NordVPN:
    sudo apt update
    sudo apt install nordvpn
  4. Add yourself to the nordvpn group:
    sudo usermod -aG nordvpn $USER
    • Log out and back in to apply.

Logging In and Connecting

Once installed and group-membership is active:

  1. Log in:
    nordvpn login

    This will open your browser to authenticate.

  2. Connect to a server:
    nordvpn connect

    By default, NordVPN picks the fastest nearby server.

  3. Disconnect:
    nordvpn disconnect

Handy CLI Commands

  • List available servers:
    nordvpn servers
  • Set auto-connect on boot:
    nordvpn set autoconnect on
  • Enable the kill-switch (blocks traffic if VPN drops):
    nordvpn set killswitch on
  • Switch protocol (e.g. NordLynx/WireGuard):
    nordvpn set technology NordLynx
  • See all options:
    nordvpn help
  • Protocol: Choose UDP for speed or TCP for reliability
    nordvpn set protocol udp
    # or
    nordvpn set protocol tcp
    
    VPN Technology: WireGuard-based NordLynx is generally faster and more stable than OpenVPN:
    nordvpn set technology NordLynx
    # or
    nordvpn set technology OpenVPN
    
    Kill Switch: Block all non-VPN traffic if the tunnel drops
    nordvpn set killswitch on
    # or
    nordvpn set killswitch off
    
    Auto-Connect (at boot/login)
    # Default (fastest server anywhere)
    nordvpn set autoconnect on
    
    # Specific country or server, e.g. US server #2435:
    nordvpn set autoconnect on us2435
    
    Obfuscated Servers: Use if you’re on a restrictive network that blocks VPN
    nordvpn set obfuscate on
    # or
    nordvpn set obfuscate off
    
    Threat Protection (formerly CyberSec)
    nordvpn set threatprotectionlite on
    # or
    nordvpn set threatprotectionlite off
    Custom DNS
    nordvpn set dns 1.1.1.1 1.0.0.1
    
    View your current settings
    nordvpn settings
    Autoconnect to a specific server (use with dedicated static IP)
    nordvpn set autoconnect on us2435