Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Connect 3rd Party VPN on AWS EC2 Ubuntu [closed]

$
0
0

I have subscribed a Dedicated IP of NordVPN and followed the official instructions to install necessary packages in my AWS EC2 Ubuntu instance. I normally access the instance via AWS admin console. Yet I struggled with two issues:

  1. The terminal will always freeze when I try to execute: sudo nordvpn connect xxx where xxx is my dedicated IP's server
  2. While I don't know why the above command fails, I manage to manually connect via openvpn command with some IP rules (Ref: https://serverfault.com/questions/659955/allowing-ssh-on-a-server-with-an-active-openvpn-client/660106#660106). However if I do not kill / disconnect the vpn connection, I cannot SSH access my EC2 instance anymore
sudo ip rule add from $(ip route get 1 | grep -Po '(?<=src )(\S+)') table 128sudo ip route add table 128 to $(ip route get 1 | grep -Po '(?<=src )(\S+)')/32 dev $(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')sudo ip route add table 128 default via $(ip -4 route ls | grep default | grep -Po '(?<=via )(\S+)')sudo route add -host [my EC2's elastic IP] gw [my EC2's gateway]sudo openvpn --config /etc/openvpn/ovpn_udp/xxx.nordvpn.com.udp.ovpn --daemon --auth-user-pass pass.txt --auth-nocache

So my question is:

Why the official command of NordVPN doesn't work as expected, and is there any way to make my EC2 instance SSH accessible even if the VPN is connected?


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>