0

I want to use a third-party VPN service on a Amazon AWS EC2 instance, and set up NordVPN with OpenVPN.

After following the instructions in this answer I'm still not able to SSH into the instance after activating the VPN. Does the fact that the Ubuntu machine is running on EC2 require me to do anything else?

Martin Konrad
  • 2,090
  • 2
  • 16
  • 32
tsorn
  • 119
  • 5

2 Answers2

2

Would love to know the answer myself, but here is a hack I did.

you can run whatever inside a shell, you'll lose ssh, but it will run from the vpn.

#!/bin/bash

echo "Executing Nord VPN"
nordvpn connect us5215
echo "Executing Python"
python3.8 /home/ubuntu/main.py
echo "Disconnecting VPN"
nordvpn disconnect
0

SSH is not lost by connecting via nordvpn's mesh network.
Mesh networking is a relatively recent addition.

$ nordvpn set meshnet on