Question

can not connect to droplet via SSH after enabling nordvpn on the server

Posted July 12, 2021 76 views
Node.jsNetworkingFirewallVPN

I am using the droplet for a NodeJS app, when I enable the nordvpn I am not able to SSH from my pc and also not able to connect to my nodejs app which is running on port 5000.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,
The problem here that I understand is that when you connect your droplet with Nord VPN all the outbound traffic is transferred through the VPN tunnel. When you SSH into the droplet the first connection from your local machine to the droplet will be through droplet public IP but when the droplet replies to the SSH connection it send traffic over the VPN tunnel which is why the cycle doesn’t complete and you can not connect SSH to your droplet.

I would prefer to add a route for your system IP (Public IP) that all of your traffic for your specific IP is routed over the default interface configured on the droplet.

https://devconnected.com/how-to-add-route-on-linux/
https://www.linuxtechi.com/add-delete-static-route-linux-ip-command/

Thanks
Mohsin Saeed

  • Hi Mohsin Saeed, thanks for the answer, I tried the method and I might be doing something wrong here I used the following command

    ip route add 122.XXX.XXX.XXX via 159.65.136.202 dev eth0

    122.xxx.xxx.xxx => my pc public IP
    159.65.136.202 => is my droplet IPv4

    after adding this I could not even connect normally, when I del the above route I was able to connect again but not when VPN is enabled on droplet.