Firewalla - NordVpn WireGuard protocol
I really get low response time, better speed using Wireguard instead of OpenVpn on NordVpn.
Here is how is did it:
Installed a Ubuntu vm (you may use WSL).
I turned off Adguard on my PC, and VPN connections on my FireWalla.
sudo apt install wireguard curl jq net-tools
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
# I turned off MFA on NordVpn (just to make things easy)
sudo nordvpn login --legacy --username yourname@yourdomain.com --password yourpassword
sudo nordvpn set technology nordlynx
sudo nordvpn connect Norway (or what country you prefer)
sudo ifconfig nordlynx
#script below
# The script generates a QR code and a config file.
# Just scan the QR code in Firewalla app.
# BUT, some does not work, and thos who word takes time to enable connect.
# I hade to wait 6-18 hours, then the WireGuard config could be enabled.
./nordvpnwire.sh
--------------------------------------------------------------------------------------------------------------
#!/bin/bash
my_interface=$(sudo wg show | grep interface | cut -d" " -f2)
my_privkey=$(sudo wg show $my_interface private-key)
my_ip=$(ip -f inet addr show $my_interface | awk '/inet/ {print $2}')
read host ip city country serv_pubkey < <( echo $(curl -s "https://api.nordvpn.com/v1/servers/recommendations?&filters\[servers_technologies\]\[identifier\]=wireguard_udp&limit=1" | jq -r '.[]|.hostname, .station, (.locations|.[]|.country|.city.name), (.locations|.[]|.country|.name), (.technologies|.[].metadata|.[].value)'))
sid=$(echo $host | cut -d. -f1)
fn="nvpn_"$sid".conf"
echo Server: $host \($ip\) has pubkey $serv_pubkey
echo writing config to $fn
echo "#config for nordvpn server $sid" > $fn
echo "[Interface]" >> $fn
echo "Address = $my_ip" >> $fn
echo "PrivateKey = $my_privkey" >> $fn
echo "" >> $fn
echo "[Peer]" >> $fn
echo "PublicKey = $serv_pubkey" >> $fn
echo "AllowedIPs = 0.0.0.0/0" >> $fn
echo "Endpoint = $host:51820" >> $fn
echo ""
echo "Content of $fn:"
cat $fn
qrencode -t ansiutf8 < $fn
# uncomment this line to automatically copy the .conf to the wg directory, then you can use it directly with "wg-quick up nvpn_xy1234"
#sudo mv $fn /etc/wireguard && sudo chmod 600 /etc/wireguard/$fn
----------------------------------------------------------------------------------------------------------------
-
nice.
just to be clear, you installed the VM on your PC and not on your firewalla device ?
I'm new to firewalla (one week in) and read somewhere that you can add docker containers (and VMs?) to micro sd card that you add to firewalla router
did you try that by any chance ?
as would be nice to use wireguard vpn client inside firewalla h/w without needing to rely on external dedicated PC/VM.
Please sign in to leave a comment.
Comments
7 comments