Introduction
This article explains how to set up a NordVPN connection on your OpenWrt router using the NordVPN Lite (nordvpnlite) client via the LuCI web interface or the command-line interface (CLI).
Before you start
- You will need an OpenWrt router with either LuCI enabled for the web interface steps or SSH access for the command-line steps.
- You will need your Nord Account authentication token, which you can get by logging in to your Nord Account dashboard.
- You will need to download the NordVPN Lite package that matches your router's architecture (aarch64, mipsel, or x86_64) from the NordVPN downloads page.
Here’s what to do
Using the LuCI web interface
- Download the package:
- Download the
.ipkpackage that matches your router's CPU from the NordVPN downloads page to your computer.
- Download the
- Install the package:
- Open the LuCI web interface in your browser: http://<router-ip>/ (often 192.168.1.1).
- Click "System" and then "Software."
- Click "Update lists."
- Under "Upload Package", select the downloaded
.ipkfile and click "Upload & Install."
NOTE: If you only see a URL field, paste the direct link to the .ipk and install.
- Configure NordVPN Lite:
- Once the installation is complete, navigate to "System" and then "File Editor."
- In the "Path" field, enter /etc/nordvpnlite/config.json
- Paste the configuration below into the text field and click "Save":
NOTE: Replace YOUR_AUTH_TOKEN_HERE with the token from your Nord Account.
{
"log_level": "error",
"log_file_path": "/var/log/nordvpnlite.log",
"adapter_type": "linux-native",
"interface": {
"name": "nordvpnlite",
"max_route_priority": 6000,
"config_provider": "uci"
},
"authentication_token": "YOUR_AUTH_TOKEN_HERE",
"vpn": "recommended"
}- Start the connection:
- Navigate to "System" and then "Startup."
- Find
nordvpnlitein the list and click "Start."
- Verify the connection:
- You can check the connection status in the LuCI web interface by navigating to "Status" and clicking "System Log" for connection messages.
- You can also see the nordvpnlite interface under "Network" and clicking "Interfaces."
Using the command-line interface (CLI)
First, connect to your router via SSH by entering ssh root@<router-ip>. Then follow the steps below.
- Download the package:
- Enter the command below to download the package directly into the
/tmpdirectory on your router. Replace<file-name>.ipkwith the correct file URL from the downloads page:wget https://downloads.nordcdn.com/nordvpnlite/<file-name>.ipk -P /tmp
- Enter the command below to download the package directly into the
- Install the package:
- Update the package lists:
opkg update. - Install the package:
opkg install /tmp/<file-name>.ipk.
- Update the package lists:
- Configure NordVPN Lite:
- Create and edit the configuration file by entering the command below.
NOTE: ReplaceYOUR_AUTH_TOKEN_HEREwith your actual token before you run the command. Keep your token secret:
- Create and edit the configuration file by entering the command below.
cat >/etc/nordvpnlite/config.json <<'JSON'
{
"log_level": "error",
"log_file_path": "/var/log/nordvpnlite.log",
"adapter_type": "linux-native",
"interface": {
"name": "nordvpnlite",
"max_route_priority": 6000,
"config_provider": "uci"
},
"authentication_token": "YOUR_AUTH_TOKEN_HERE",
"vpn": "recommended"
}
JSON- Start the connection:
- Enter the command:
nordvpnlite start.
- Enter the command:
- Verify the connection:
- You can use the following commands to check your connection:
-
nordvpnlite status— Shows the current connection status. -
ip <PERSON> nordvpnlite— Confirms that thenordvpnlitenetwork interface is active. -
wget -qO- https://ipinfo.io/ip— Shows your current public IP address, which should be a NordVPN server IP.
-
- You can use the following commands to check your connection:
- Change location:
- Edit the configuration file to change the VPN server location. For example, to connect to Germany, you would run:
sed -i 's/"vpn": "recommended"/"vpn": { "country": "de" }/' /etc/nordvpnlite/config.json - Restart the service to apply the new settings:
nordvpnlite stopnordvpnlite start - To see a list of all available country codes, run:
nordvpnlite countries.
- Edit the configuration file to change the VPN server location. For example, to connect to Germany, you would run:
- Update or remove:
- To update: Download the newer
.ipkpackage and install it using the same method as in steps 1 and 2. Your configuration file will be preserved. - To remove: Enter the command
opkg remove nordvpnlite.
- To update: Download the newer
- Stop the connection:
- To disconnect from the VPN, run
nordvpnlite stop.
- To disconnect from the VPN, run
Additional tips
- If you have connection issues, recheck your authentication token, JSON syntax, and your router's time.
- If the network interface is missing, make sure the service is started and that no other VPN client is using the same interface name.
- For more detailed logs, temporarily set
"log_level": "info"in the config file, restart the service, and review the log at/var/log/nordvpnlite.log. -
nordvpnliteis open-sourced. You may visit the official GitHub project page and repository, which contains more information.