Linux/Routing

From Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

How can service D communicate with Service A?

[           HomeserverVM - 1           ]                 [                ServerVM - 2               ]
Docker:Service A   <-->   OpenVPN Client <-------------> Docker: OpenVPN Server <--> Docker: Service D
       >A<                    >B<                                      >C<                      >D<
   172.111.1.2             10.8.0.2                                172.1.4.3                 172.1.4.5

2) Server VM

ip route add 172.111.0.0/16 via 172.1.4.3 dev br-...openvpncontainer..


2-C)OpenVPN Server

iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

server.conf:
route 172.111.0.0 255.255.0.0

clients/homeserver:
iroute 172.111.0.0 255.255.0.0