I need to understand how to make two docker containers work with a scenario like this:
There is a branch office with a router and a client. The network is 192.168.190.0/24 and the addresses are 1 and 57.
There is somewhere else a VM facing on the internet with public IP X.Y.Z.K and the docker environment installed on top. Inside there are two containers. The first one is a web server facing only on a private network with address 192.168.80.2. The other container has connection on the private network with address 192.168.80.44 and exposes its 1194 port on the other network interface to the public IP.
I need to be able to make 192.168.190.57 open the pages on 192.168.80.2.
The VPN part works fine (the router connects and is pingable from the client) and I don't need help on that.
This is a mockup for my docker-compose file.
version: '2' services: openvpn: image: mycompany/openvpn restart: 'always' cap_add: - NET_ADMIN ports: - '1194:1194/udp' networks: nat: private_net: ipv4_address: '192.168.80.44' coredns: image: 'nginx' restart: 'always' links: - openvpn:private_net_vpn networks: private_net: ipv4_address: '192.168.80.2' networks: private_net: internal: true ipam: config: - subnet: '192.168.80.0/24' nat: