NAT and Dockercontainer

derkadinal

New Member
Joined
Aug 17, 2020
Messages
2
Reaction score
0
Credits
32
Hello,

I have the following setup using a Docker environment and a Wirguard Server.

The Docker environment is composed by three Services (VPN, Service A, Service B) each with their separate image. They all share a common Docker Network.
In Addition the VPN Service runs a wireguard server (Subnet 10.1.0.0/16). The Docker Network has the Subnet 10.0.0.0/16.

I have no special Natting rules set. When a client (10.1.0.2) connects to the wirguard Server endpoint (10.1.0.1) it CAN ping 10.1.0.1 as well as the secondary IP of the VPN Image 10.0.0.10. But if I try to ping Service A (10.0.0.20) or Service B (10.0.0.30) from the Client (10.1.0.2), Service A wants to reply directly to the Client instead of going trough the Wireguard Server.

How can I setup the network, so that the ICMP response goes over the VPN Server?

BR
 

Members online


Latest posts

Top