Unknownpgr

Resolving Network Issues Caused by a VPN

2023-12-29 09:57:44 | English, Korean

This post was translated from Korean into English by AI.

While working with a VPN, I ran into a networking issue. This post describes the problem and how I resolved it.

Problem

The situation was as follows.

So I tried the following process.

  1. Install a VPN client on Server A.
  2. Connect Server A to the VPN.
  3. Attempt to communicate from Server A to Server B.

However, as soon as I performed step 2, the SSH connection to Server A was lost.

Diagnosis

After investigating the issue, I found that it occurred for the following reasons.

Solution

First, because it would be inconvenient to lose network connectivity every time I ran a test, I created a container and conducted the tests inside it. Containers separate network namespaces, isolating routing tables and other network settings so they do not affect the host machine.

To describe the problem more specifically:

I used the following approach to solve the problem.

The final step works because the destination IP address of inbound traffic—and therefore the source IP address of outbound traffic—differs depending on the path the traffic takes.

References


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -