NordVPN is a popular Virtual Private Network (VPN) service that offers enhanced online privacy and security. The service can be used through a graphical user interface (GUI) or through the command line interface (CLI). In this blog post, we will take a look at the NordVPN CLI commands and how they can be used on various Linux-based operating systems.
Installing NordVPN on Linux
Before diving into the NordVPN CLI commands, let’s first look at how to install the NordVPN client on a Linux system. NordVPN provides a command-line installation script for various Linux distributions, including Debian, Ubuntu, Linux Mint, Elementary OS, and Raspberry Pi OS. The script automatically installs the NordVPN client and its dependencies.
To install NordVPN, follow these steps:
Open the terminal on your Linux system.
Download the NordVPN installation script by running the following command:
curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh
Install the NordVPN repository by running the following command:
wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh
Install the NordVPN client by running the following command:
sudo apt-get update sudo apt-get install -y nordvpn
After the installation is complete, you can start using the NordVPN CLI commands.
NordVPN CLI Commands
Here is a list of the NordVPN CLI commands that can be used on a Linux system:
- nordvpn login: This command is used to log in to the NordVPN service. You will need to provide your NordVPN username and password.
- nordvpn connect: This command is used to connect to a NordVPN server. You can specify the server location by adding the country or city name after the connect command. For example, nordvpn connect us will connect to a server in the United States.
- nordvpn disconnect: This command is used to disconnect from the NordVPN server.
- nordvpn set: This command is used to change the NordVPN client settings. You can use this command to enable or disable various features such as the kill switch, cybersec, and obfuscate.
- nordvpn status: This command is used to display the current NordVPN connection status.
- nordvpn countries: This command is used to list all the available NordVPN server locations by country.
- nordvpn cities: This command is used to list all the available NordVPN server locations by city.
- nordvpn groups: This command is used to list all the available NordVPN server groups.
- nordvpn settings: This command is used to display the current NordVPN client settings.
- nordvpn account: This command is used to display the NordVPN account details.
- nordvpn rate: This command is used to rate the NordVPN service.
- nordvpn whitelist: This command is used to add an IP address to the NordVPN whitelist.
- nordvpn set technology: This command is used to change the NordVPN connection technology. You can use this command to switch between the UDP and TCP protocols.
- nordvpn set protocol: This command is used to change the NordVPN encryption protocol. You can use this command to switch between the IKEv2 and OpenVPN protocols.
- nordvpn set dns: This command is used to change the NordVPN DNS settings.
To access the NordVPN client settings, type the nordvpn command in Terminal.
- nordvpn login – Log in.
- nordvpn connect or nordvpn c – Connect to VPN.
- To connect to specific servers, use nordvpn connect <country_code server_number> (eg. nordvpn connect uk715)
- nordvpn disconnect or nordvpn d – Disconnect from VPN.
- nordvpn c double_vpn – Connect to the closest Double VPN server.
- nordvpn connect –group double_vpn <country_code> – Connect to a specific country using DoubleVPN servers.
- nordvpn connect P2P – Connect to a P2P server.
- nordvpn connect The_Americas – Connect to servers located in the Americas.
- nordvpn connect Dedicated_IP – Connect to a Dedicated IP server.
- nordvpn set or nordvpn s – Set a configuration option.
- Possible options:
- nordvpn set threatprotectionlite on or off – Enable or disable Threat Protection Lite
- nordvpn set killswitch on or off – Enable or disable Kill Switch
- nordvpn set autoconnect on or off – Enable or disable auto-connect. You can set a specific server for automatic connection using nordvpn set autoconnect on country_code+server_number. Example: nordvpn set autoconnect on us2435.
- nordvpn set notify on or off – Enable or disable notifications
- nordvpn set dns 184.108.40.206 220.127.116.11 – Set custom DNS (you can set up a single DNS or two like shown in this command).
- nordvpn set protocol udp or tcp – Switch between UDP and TCP protocols
- nordvpn set obfuscate on or off – Enable or disable Obfuscated Servers.
- nordvpn set technology – Set connection technology (OpenVPN or NordLynx)
- nordvpn set meshnet on – Turn on Meshnet on your device.
- nordvpn whitelist add port 22 – Add a rule to whitelist a specified incoming port. You can also whitelist multiple ports — just separate their numbers with a space.
- nordvpn whitelist remove port 22 – Remove the rule to whitelist a specified port.
- nordvpn whitelist add subnet 192.168.0.0/16 – Add a rule to whitelist a specified subnet.
- nordvpn whitelist remove subnet 192.168.0.0/16 – Remove the rule to whitelist a specified subnet.
- nordvpn account – See account information
- nordvpn register – Register a new user account
- nordvpn rate – Rate your last connection quality (1-5)
- nordvpn settings – See the current settings.
- nordvpn status – See the connection status.
- nordvpn countries – See the country list.
- nordvpn cities – See the city list. E.g.: nordvpn cities united_states
- nordvpn groups – See a list of available server groups.
These NordVPN CLI commands allow you to customize your NordVPN client experience and access various features to enhance your online security and privacy. With these commands, you can connect to specific server locations, configure settings, and whitelist incoming ports and subnets.
It’s important to note that some commands, such as nordvpn set killswitch on, can have significant impacts on your NordVPN connection, so be sure to use these commands with caution and read the NordVPN documentation before making changes to your settings.