How to allow SSH into Terminal after connecting to VPN server using NordVPN servers through OpenVPN?

αԋɱҽԃ αмєяιcαη

I'm using Linux CentOS 7 Server and I already installed OpenVPN and NordVPN servers which I use to connect my Linux to.

After establishing the VPN Connection, immediately my SSH access got disconnected.

How to allow SSH access to the server while it's connected to VPN Server? And how to make it work whenever the server is rebooted?

I used this tutorial on my setup: https://nordvpn.com/tutorials/linux/openvpn/

αԋɱҽԃ αмєяιcαη

I were able to find a solution for my issue by:

when you connect to the Server by its public IP address, the return packets get routed over the VPN. You need to force these packets to be routed over the public eth0 interface. These route commands should do the trick:

ip rule add from x.x.x.x table 128
ip route add table 128 to y.y.y.y/y dev eth0
ip route add table 128 default via z.z.z.z

Where x.x.x.x is your Server public IP, y.y.y.y/y should be the subnet of your Server public IP address, eth0 should be your Server public Ethernet interface, and z.z.z.z should be the default gateway.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Connecting to VPN Gate using Openvpn

From Dev

How to add route after connecting to openvpn server?

From Dev

Connecting to a VPN server through another VPN server

From Dev

How to run script (.sh) files in a new terminal after connecting to Ubuntu 16.04 server via ssh?

From Dev

OpenVPN client internet lost when connecting OpenVPN server to another VPN while OpenVPN server has the internet

From Dev

Internet becomes unavailible after connecting through vpn

From Dev

VPS goes out of reach after connecting to a VPN (OpenVPN)

From Dev

Allow internet access only through vpn server

From Dev

Connecting MacOS to an OpenVPN server using the OpenVPN Connect Client

From Dev

Connecting MySQL to server through another server by SSH

From Dev

NFS stops responding after connecting to NordVPN

From Dev

How to only allow access to web server through SSH?

From Dev

Connecting to ubuntu server (SSH), how to stop terminating process after logout?

From Dev

Connecting with vinagre (VNC) through intermediary ssh server

From Dev

Connecting SSH server through chrome (or any browser)

From Dev

How to configure SSH to connect through an OpenVPN?

From Dev

troubleshooting OpenVPN not connecting to the server

From Dev

Connecting to my local network through OpenVPN (using PiVPN): inconsistently works

From Dev

Local SSH connection still alive after connecting to a VPN

From Dev

FTP server connection is refused when connecting through VPN

From Dev

OpenVPN on Ubuntu Linux, connection established, how to send data through vpn?

From Dev

Starting SSH server after VPN starts

From Dev

How to setup NordVNP Nameservers for VPN + non-VPN use in NordVPN?

From Dev

Connecting to Windows Guest using Headless Virtualbox / phpvirtualbox and an OpenVPN-Server

From Dev

OpenVPN - SSH into OpenVPN client from OpenVPN server

From Dev

how to give user server name instead of ip when connecting through SSH?

From Dev

How to prevent Firefox from connecting to the internet through VPN

From Dev

How to determine which network interface VPN is connecting through?

From Dev

How to set domain name for server inside an OpenVPN-based VPN?

Related Related

  1. 1

    Connecting to VPN Gate using Openvpn

  2. 2

    How to add route after connecting to openvpn server?

  3. 3

    Connecting to a VPN server through another VPN server

  4. 4

    How to run script (.sh) files in a new terminal after connecting to Ubuntu 16.04 server via ssh?

  5. 5

    OpenVPN client internet lost when connecting OpenVPN server to another VPN while OpenVPN server has the internet

  6. 6

    Internet becomes unavailible after connecting through vpn

  7. 7

    VPS goes out of reach after connecting to a VPN (OpenVPN)

  8. 8

    Allow internet access only through vpn server

  9. 9

    Connecting MacOS to an OpenVPN server using the OpenVPN Connect Client

  10. 10

    Connecting MySQL to server through another server by SSH

  11. 11

    NFS stops responding after connecting to NordVPN

  12. 12

    How to only allow access to web server through SSH?

  13. 13

    Connecting to ubuntu server (SSH), how to stop terminating process after logout?

  14. 14

    Connecting with vinagre (VNC) through intermediary ssh server

  15. 15

    Connecting SSH server through chrome (or any browser)

  16. 16

    How to configure SSH to connect through an OpenVPN?

  17. 17

    troubleshooting OpenVPN not connecting to the server

  18. 18

    Connecting to my local network through OpenVPN (using PiVPN): inconsistently works

  19. 19

    Local SSH connection still alive after connecting to a VPN

  20. 20

    FTP server connection is refused when connecting through VPN

  21. 21

    OpenVPN on Ubuntu Linux, connection established, how to send data through vpn?

  22. 22

    Starting SSH server after VPN starts

  23. 23

    How to setup NordVNP Nameservers for VPN + non-VPN use in NordVPN?

  24. 24

    Connecting to Windows Guest using Headless Virtualbox / phpvirtualbox and an OpenVPN-Server

  25. 25

    OpenVPN - SSH into OpenVPN client from OpenVPN server

  26. 26

    how to give user server name instead of ip when connecting through SSH?

  27. 27

    How to prevent Firefox from connecting to the internet through VPN

  28. 28

    How to determine which network interface VPN is connecting through?

  29. 29

    How to set domain name for server inside an OpenVPN-based VPN?

HotTag

Archive