I have already described a simple way to manually configure Network Manager and automatically import NordVPN servers, so today, I will explain how to pretty print servers recommended by NordVPN using terminal instead of web-browser.
Prerequisites
Install curl
to transfer data from a server and jq
lightweight and flexible command-line JSON processor.
$ sudo apt install curl jq
Display recommended VPN servers
Display recommended NordVPN servers.
$ curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations' | jq --raw-output '.[].hostname'
pl24.nordvpn.com pl25.nordvpn.com pl19.nordvpn.com pl40.nordvpn.com pl59.nordvpn.com
These are the nearest servers sorted by the current load.
Display additional information about recommended VPN servers
Display the top three recommended NordVPN servers, including basic information.
$ curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations' | jq --raw-output 'limit(3;.[]) | " Server: \(.name)\nHostname: \(.hostname)\nLocation: \(.locations[0].country.name) - \(.locations[0].city.name)\n Load: \(.load)\n"' Server: Poland #61 Hostname: pl61.nordvpn.com Location: Poland - Warsaw Load: 10 Server: Poland #19 Hostname: pl19.nordvpn.com Location: Poland - Warsaw Load: 11 Server: Poland #36 Hostname: pl36.nordvpn.com Location: Poland - Warsaw Load: 12
Display the top three recommended NordVPN servers, including most of the available information.
$ curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations' | jq --raw-output 'limit(3;.[]) | " Server: (.name)n Hostname: (.hostname)n Location: (.locations[0].country.name) - (.locations[0].city.name)n Load: (.load)n Created: (.created_at)n Updated: (.updated_at)n Region: (.groups | map(select( .type.identifier == "regions") | .title) | join(", "))n Groups: (.groups | map(select( .type.identifier == "legacy_group_category") | .title) | join(", "))nTechnologies: ", "(.technologies | map(select( .pivot.status == "online") | .name) | " - (.[])")",""'
Server: Poland #62 Hostname: pl62.nordvpn.com Location: Poland - Warsaw Load: 8 Created: 2018-11-22 15:06:25 Updated: 2019-01-12 14:31:57 Region: Europe Groups: Standard VPN, P2P Technologies: - IKEv2/IPSec - OpenVPN UDP - OpenVPN TCP - Socks 5 - HTTP Proxy - HTTP CyberSec Proxy - HTTP Proxy (SSL) - HTTP CyberSec Proxy (SSL) Server: Poland #36 Hostname: pl36.nordvpn.com Location: Poland - Warsaw Load: 10 Created: 2018-03-23 09:42:58 Updated: 2019-01-12 14:30:01 Region: Europe Groups: Standard VPN, P2P Technologies: - IKEv2/IPSec - OpenVPN UDP - OpenVPN TCP - Socks 5 - HTTP Proxy - HTTP CyberSec Proxy - HTTP Proxy (SSL) - HTTP CyberSec Proxy (SSL) Server: Poland #60 Hostname: pl60.nordvpn.com Location: Poland - Warsaw Load: 11 Created: 2018-11-22 08:54:38 Updated: 2019-01-12 14:31:56 Region: Europe Groups: Standard VPN, P2P Technologies: - IKEv2/IPSec - OpenVPN UDP - OpenVPN TCP - Socks 5 - HTTP Proxy - HTTP CyberSec Proxy - HTTP Proxy (SSL) - HTTP CyberSec Proxy (SSL)
Apply filter to display recommended VPN servers for a specific country
Display the top three recommended NordVPN servers located in Germany.
$ curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22country_id%22:81}' | jq --raw-output 'limit(3;.[]) | " Server: (.name)nHostname: (.hostname)nLocation: (.locations[0].country.name) - (.locations[0].city.name)n Load: (.load)n"'
Server: Germany #429 Hostname: de429.nordvpn.com Location: Germany - Berlin Load: 10 Server: Germany #499 Hostname: de499.nordvpn.com Location: Germany - Berlin Load: 15 Server: Germany #440 Hostname: de440.nordvpn.com Location: Germany - Berlin Load: 15
Display the top three recommended NordVPN servers located in the United States.
$ curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22country_id%22:228}' | jq --raw-output 'limit(3;.[]) | " Server: (.name)nHostname: (.hostname)nLocation: (.locations[0].country.name) - (.locations[0].city.name)n Load: (.load)n"'
Server: United States #1185 Hostname: us1185.nordvpn.com Location: United States - New York Load: 10 Server: United States #1710 Hostname: us1710.nordvpn.com Location: United States - New York Load: 12 Server: United States #2959 Hostname: us2959.nordvpn.com Location: United States - New York Load: 12
Country codes used in this filter.
Country |
---|
Albania |
Argentina |
Australia |
Austria |
Azerbaijan |
Belgium |
Bosnia and Herzegovina |
Brazil |
Bulgaria |
Canada |
Chile |
Costa Rica |
Croatia |
Cyprus |
Czech Republic |
Denmark |
Egypt |
Estonia |
Finland |
France |
Georgia |
Germany |
Greece |
Hong Kong |
Hungary |
Iceland |
India |
Indonesia |
Ireland |
Israel |
Italy |
Japan |
Latvia |
Luxembourg |
Macedonia |
Malaysia |
Mexico |
Moldova |
Netherlands |
New Zealand |
Norway |
Poland |
Portugal |
Romania |
Russia |
Serbia |
Singapore |
Slovakia |
Slovenia |
South Africa |
South Korea |
Spain |
Sweden |
Switzerland |
Taiwan |
Thailand |
Turkey |
Ukraine |
United Arab Emirates |
United Kingdom |
United States |
Vietnam |
Apply filter to display recommended VPN servers for a specific country
There are additional filters, like server groups and technology. Just remember to use both of these at the same time.
Display the top three recommended NordVPN servers that are hidden and located in Singapore.
$ curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22country_id%22:195,%22servers_groups%22:[17],%22servers_technologies%22:[15]}' | jq --raw-output 'limit(3;.[]) | " Server: (.name)n Hostname: (.hostname)n Location: (.locations[0].country.name) - (.locations[0].city.name)n Load: (.load)n Created: (.created_at)n Updated: (.updated_at)n Region: (.groups | map(select( .type.identifier == "regions") | .title) | join(", "))n Groups: (.groups | map(select( .type.identifier == "legacy_group_category") | .title) | join(", "))nTechnologies: ", "(.technologies | map(select( .pivot.status == "online") | .name) | " - (.[])")",""'
Server: Singapore #97 Hostname: sg97.nordvpn.com Location: Singapore - Singapore Load: 2 Created: 2018-02-27 14:20:12 Updated: 2019-01-12 14:53:51 Region: Asia Pacific Groups: Obfuscated Technologies: - OpenVPN UDP Obfuscated - OpenVPN TCP Obfuscated Server: Singapore #96 Hostname: sg96.nordvpn.com Location: Singapore - Singapore Load: 2 Created: 2018-02-27 14:20:12 Updated: 2019-01-12 14:53:51 Region: Asia Pacific Groups: Obfuscated Technologies: - OpenVPN UDP Obfuscated - OpenVPN TCP Obfuscated Server: Singapore #111 Hostname: sg111.nordvpn.com Location: Singapore - Singapore Load: 4 Created: 2018-03-27 07:23:32 Updated: 2019-01-12 14:54:07 Region: Asia Pacific Groups: Obfuscated Technologies: - OpenVPN UDP Obfuscated - OpenVPN TCP Obfuscated
Display the top three nearest and hidden NordVPN servers.
$ curl --silent 'https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters={%22servers_groups%22:[17],%22servers_technologies%22:[15]}' | jq --raw-output 'limit(3;.[]) | " Server: (.name)n Hostname: (.hostname)n Location: (.locations[0].country.name) - (.locations[0].city.name)n Load: (.load)n Created: (.created_at)n Updated: (.updated_at)n Region: (.groups | map(select( .type.identifier == "regions") | .title) | join(", "))n Groups: (.groups | map(select( .type.identifier == "legacy_group_category") | .title) | join(", "))nTechnologies: ", "(.technologies | map(select(.pivot.status == "online") | .name) | " - (.[])")",""'
Server: Sweden #182 Hostname: se182.nordvpn.com Location: Sweden - Stockholm Load: 20 Created: 2018-07-17 08:29:23 Updated: 2019-01-12 15:03:29 Region: Europe Groups: Obfuscated Technologies: - OpenVPN UDP Obfuscated - OpenVPN TCP Obfuscated Server: Sweden #184 Hostname: se184.nordvpn.com Location: Sweden - Stockholm Load: 20 Created: 2018-07-17 08:29:28 Updated: 2019-01-12 15:03:29 Region: Europe Groups: Obfuscated Technologies: - OpenVPN UDP Obfuscated - OpenVPN TCP Obfuscated Server: Sweden #183 Hostname: se183.nordvpn.com Location: Sweden - Stockholm Load: 22 Created: 2018-07-17 08:29:28 Updated: 2019-01-12 15:03:29 Region: Europe Groups: Obfuscated Technologies: - OpenVPN UDP Obfuscated - OpenVPN TCP Obfuscated
Server groups used in this filter.
Server group |
---|
Double VPN |
Onion over VPN |
Dedicated IP |
Standard VPN |
P2P |
Obfuscated |
Server technologies used in this filter.
Server technology |
---|
IKEv2/IPSec |
OpenVPN UDP |
OpenVPN TCP |
SOCKS 5 |
HTTP proxy |
OpenVPN UDP Obfuscated |
OpenVPN TCP Obfuscated |
HTTP CyberSec proxy |
HTTP proxy (SSL) |
HTTP CyberSec proxy (SSL) |
Additional notes
Sample JSON file used to get recommended NordVPN servers.
[ { "id": 928820, "created_at": "2018-07-17 08:29:28", "updated_at": "2019-01-12 15:11:29", "name": "Sweden #184", "station": "31.13.191.173", "hostname": "se184.nordvpn.com", "subdomain": "se184", "load": 18, "enabled": 1, "status": "online", "mac_address": null, "distance": 600.2043627780213, "rating": 0.12370630323979404, "locations": [ { "id": 229, "created_at": "2017-06-15 14:06:47", "updated_at": "2017-06-15 14:06:47", "country_id": 208, "latitude": 59.333333, "longitude": 18.05, "country_city_id": 7852919, "country": { "id": 208, "name": "Sweden", "code": "SE" }, "city": { "id": 7852919, "created_at": "2018-05-09 11:17:06", "updated_at": "2018-05-09 11:17:06", "name": "Stockholm", "country_id": 208, "latitude": "59.3333330", "longitude": "18.0500000", "geohash": "u6scd9r9eqzt", "dns_name": "stockholm", "is_active": 1, "hub_score": null } } ], "technologies": [ { "id": 15, "name": "OpenVPN UDP Obfuscated", "identifier": "openvpn_xor_udp", "created_at": "2017-05-26 14:04:04", "updated_at": "2017-11-07 08:37:53", "pivot": { "status": "online" } }, { "id": 17, "name": "OpenVPN TCP Obfuscated", "identifier": "openvpn_xor_tcp", "created_at": "2017-05-26 14:04:27", "updated_at": "2017-11-07 08:38:16", "pivot": { "status": "online" } } ], "groups": [ { "id": 17, "created_at": "2017-06-13 13:44:10", "updated_at": "2017-06-13 13:44:10", "title": "Obfuscated", "identifier": "legacy_obfuscated_servers", "type": { "id": 3, "created_at": "2017-06-13 13:40:17", "updated_at": "2017-06-13 13:40:23", "title": "Legacy category", "identifier": "legacy_group_category" } }, { "id": 19, "created_at": "2017-10-27 14:17:17", "updated_at": "2017-10-27 14:17:17", "title": "Europe", "identifier": "europe", "type": { "id": 5, "created_at": "2017-10-27 14:16:30", "updated_at": "2017-10-27 14:16:30", "title": "Regions", "identifier": "regions" } } ], "ips": [ { "id": 36209, "created_at": "2018-07-17 08:29:28", "updated_at": "2018-07-17 08:29:28", "server_id": 928820, "ip_id": 20918, "type": "exit", "primary": 1, "ip": { "id": 20918, "ip": "31.13.191.173", "version": 4 } } ], "subnets": [], "hosts": [] }, { "id": 928814, "created_at": "2018-07-17 08:29:23", "updated_at": "2019-01-12 15:11:29", "name": "Sweden #182", "station": "31.13.191.171", "hostname": "se182.nordvpn.com", "subdomain": "se182", "load": 20, "enabled": 1, "status": "online", "mac_address": null, "distance": 600.2043627780213, "rating": 0.12370630338842435, "locations": [ { "id": 229, "created_at": "2017-06-15 14:06:47", "updated_at": "2017-06-15 14:06:47", "country_id": 208, "latitude": 59.333333, "longitude": 18.05, "country_city_id": 7852919, "country": { "id": 208, "name": "Sweden", "code": "SE" }, "city": { "id": 7852919, "created_at": "2018-05-09 11:17:06", "updated_at": "2018-05-09 11:17:06", "name": "Stockholm", "country_id": 208, "latitude": "59.3333330", "longitude": "18.0500000", "geohash": "u6scd9r9eqzt", "dns_name": "stockholm", "is_active": 1, "hub_score": null } } ], "technologies": [ { "id": 15, "name": "OpenVPN UDP Obfuscated", "identifier": "openvpn_xor_udp", "created_at": "2017-05-26 14:04:04", "updated_at": "2017-11-07 08:37:53", "pivot": { "status": "online" } }, { "id": 17, "name": "OpenVPN TCP Obfuscated", "identifier": "openvpn_xor_tcp", "created_at": "2017-05-26 14:04:27", "updated_at": "2017-11-07 08:38:16", "pivot": { "status": "online" } } ], "groups": [ { "id": 17, "created_at": "2017-06-13 13:44:10", "updated_at": "2017-06-13 13:44:10", "title": "Obfuscated", "identifier": "legacy_obfuscated_servers", "type": { "id": 3, "created_at": "2017-06-13 13:40:17", "updated_at": "2017-06-13 13:40:23", "title": "Legacy category", "identifier": "legacy_group_category" } }, { "id": 19, "created_at": "2017-10-27 14:17:17", "updated_at": "2017-10-27 14:17:17", "title": "Europe", "identifier": "europe", "type": { "id": 5, "created_at": "2017-10-27 14:16:30", "updated_at": "2017-10-27 14:16:30", "title": "Regions", "identifier": "regions" } } ], "ips": [ { "id": 36203, "created_at": "2018-07-17 08:29:24", "updated_at": "2018-07-17 08:29:24", "server_id": 928814, "ip_id": 20912, "type": "exit", "primary": 1, "ip": { "id": 20912, "ip": "31.13.191.171", "version": 4 } } ], "subnets": [], "hosts": [] }, { "id": 926423, "created_at": "2018-05-09 13:50:12", "updated_at": "2019-01-12 15:11:23", "name": "Sweden #148", "station": "130.185.155.59", "hostname": "se148.nordvpn.com", "subdomain": "se148", "load": 23, "enabled": 1, "status": "online", "mac_address": null, "distance": 600.2043627780213, "rating": 0.12370630386135485, "locations": [ { "id": 229, "created_at": "2017-06-15 14:06:47", "updated_at": "2017-06-15 14:06:47", "country_id": 208, "latitude": 59.333333, "longitude": 18.05, "country_city_id": 7852919, "country": { "id": 208, "name": "Sweden", "code": "SE" }, "city": { "id": 7852919, "created_at": "2018-05-09 11:17:06", "updated_at": "2018-05-09 11:17:06", "name": "Stockholm", "country_id": 208, "latitude": "59.3333330", "longitude": "18.0500000", "geohash": "u6scd9r9eqzt", "dns_name": "stockholm", "is_active": 1, "hub_score": null } } ], "technologies": [ { "id": 15, "name": "OpenVPN UDP Obfuscated", "identifier": "openvpn_xor_udp", "created_at": "2017-05-26 14:04:04", "updated_at": "2017-11-07 08:37:53", "pivot": { "status": "online" } }, { "id": 17, "name": "OpenVPN TCP Obfuscated", "identifier": "openvpn_xor_tcp", "created_at": "2017-05-26 14:04:27", "updated_at": "2017-11-07 08:38:16", "pivot": { "status": "online" } } ], "groups": [ { "id": 17, "created_at": "2017-06-13 13:44:10", "updated_at": "2017-06-13 13:44:10", "title": "Obfuscated", "identifier": "legacy_obfuscated_servers", "type": { "id": 3, "created_at": "2017-06-13 13:40:17", "updated_at": "2017-06-13 13:40:23", "title": "Legacy category", "identifier": "legacy_group_category" } }, { "id": 19, "created_at": "2017-10-27 14:17:17", "updated_at": "2017-10-27 14:17:17", "title": "Europe", "identifier": "europe", "type": { "id": 5, "created_at": "2017-10-27 14:16:30", "updated_at": "2017-10-27 14:16:30", "title": "Regions", "identifier": "regions" } } ], "ips": [ { "id": 33692, "created_at": "2018-05-09 13:50:12", "updated_at": "2018-05-09 13:50:12", "server_id": 926423, "ip_id": 17624, "type": "exit", "primary": 1, "ip": { "id": 17624, "ip": "130.185.155.59", "version": 4 } } ], "subnets": [], "hosts": [] }, { "id": 928823, "created_at": "2018-07-17 08:29:28", "updated_at": "2019-01-12 15:11:29", "name": "Sweden #185", "station": "31.13.191.174", "hostname": "se185.nordvpn.com", "subdomain": "se185", "load": 24, "enabled": 1, "status": "online", "mac_address": null, "distance": 600.2043627780213, "rating": 0.12370630412435829, "locations": [ { "id": 229, "created_at": "2017-06-15 14:06:47", "updated_at": "2017-06-15 14:06:47", "country_id": 208, "latitude": 59.333333, "longitude": 18.05, "country_city_id": 7852919, "country": { "id": 208, "name": "Sweden", "code": "SE" }, "city": { "id": 7852919, "created_at": "2018-05-09 11:17:06", "updated_at": "2018-05-09 11:17:06", "name": "Stockholm", "country_id": 208, "latitude": "59.3333330", "longitude": "18.0500000", "geohash": "u6scd9r9eqzt", "dns_name": "stockholm", "is_active": 1, "hub_score": null } } ], "technologies": [ { "id": 15, "name": "OpenVPN UDP Obfuscated", "identifier": "openvpn_xor_udp", "created_at": "2017-05-26 14:04:04", "updated_at": "2017-11-07 08:37:53", "pivot": { "status": "online" } }, { "id": 17, "name": "OpenVPN TCP Obfuscated", "identifier": "openvpn_xor_tcp", "created_at": "2017-05-26 14:04:27", "updated_at": "2017-11-07 08:38:16", "pivot": { "status": "online" } } ], "groups": [ { "id": 17, "created_at": "2017-06-13 13:44:10", "updated_at": "2017-06-13 13:44:10", "title": "Obfuscated", "identifier": "legacy_obfuscated_servers", "type": { "id": 3, "created_at": "2017-06-13 13:40:17", "updated_at": "2017-06-13 13:40:23", "title": "Legacy category", "identifier": "legacy_group_category" } }, { "id": 19, "created_at": "2017-10-27 14:17:17", "updated_at": "2017-10-27 14:17:17", "title": "Europe", "identifier": "europe", "type": { "id": 5, "created_at": "2017-10-27 14:16:30", "updated_at": "2017-10-27 14:16:30", "title": "Regions", "identifier": "regions" } } ], "ips": [ { "id": 36212, "created_at": "2018-07-17 08:29:28", "updated_at": "2018-07-17 08:29:28", "server_id": 928823, "ip_id": 20921, "type": "exit", "primary": 1, "ip": { "id": 20921, "ip": "31.13.191.174", "version": 4 } } ], "subnets": [], "hosts": [] }, { "id": 921953, "created_at": "2018-01-11 08:24:40", "updated_at": "2019-01-12 15:09:19", "name": "Sweden #104", "station": "196.196.244.91", "hostname": "se104.nordvpn.com", "subdomain": "se104", "load": 27, "enabled": 1, "status": "online", "mac_address": null, "distance": 600.2043627780213, "rating": 0.12370630543173042, "locations": [ { "id": 229, "created_at": "2017-06-15 14:06:47", "updated_at": "2017-06-15 14:06:47", "country_id": 208, "latitude": 59.333333, "longitude": 18.05, "country_city_id": 7852919, "country": { "id": 208, "name": "Sweden", "code": "SE" }, "city": { "id": 7852919, "created_at": "2018-05-09 11:17:06", "updated_at": "2018-05-09 11:17:06", "name": "Stockholm", "country_id": 208, "latitude": "59.3333330", "longitude": "18.0500000", "geohash": "u6scd9r9eqzt", "dns_name": "stockholm", "is_active": 1, "hub_score": null } } ], "technologies": [ { "id": 15, "name": "OpenVPN UDP Obfuscated", "identifier": "openvpn_xor_udp", "created_at": "2017-05-26 14:04:04", "updated_at": "2017-11-07 08:37:53", "pivot": { "status": "online" } }, { "id": 17, "name": "OpenVPN TCP Obfuscated", "identifier": "openvpn_xor_tcp", "created_at": "2017-05-26 14:04:27", "updated_at": "2017-11-07 08:38:16", "pivot": { "status": "online" } } ], "groups": [ { "id": 17, "created_at": "2017-06-13 13:44:10", "updated_at": "2017-06-13 13:44:10", "title": "Obfuscated", "identifier": "legacy_obfuscated_servers", "type": { "id": 3, "created_at": "2017-06-13 13:40:17", "updated_at": "2017-06-13 13:40:23", "title": "Legacy category", "identifier": "legacy_group_category" } }, { "id": 19, "created_at": "2017-10-27 14:17:17", "updated_at": "2017-10-27 14:17:17", "title": "Europe", "identifier": "europe", "type": { "id": 5, "created_at": "2017-10-27 14:16:30", "updated_at": "2017-10-27 14:16:30", "title": "Regions", "identifier": "regions" } } ], "ips": [ { "id": 12285, "created_at": "2018-01-11 08:24:40", "updated_at": "2018-01-11 08:24:40", "server_id": 921953, "ip_id": 10623, "type": "exit", "primary": 1, "ip": { "id": 10623, "ip": "196.196.244.91", "version": 4 } }, { "id": 21077, "created_at": "2018-02-23 07:28:48", "updated_at": "2018-02-23 07:28:48", "server_id": 921953, "ip_id": 10623, "type": "entry", "primary": 1, "ip": { "id": 10623, "ip": "196.196.244.91", "version": 4 } } ], "subnets": [], "hosts": [] } ]