Q:

How to make docker containers visible for openvpn clients?

I have setup a Openvpn Server with the default subnet settings and I'm running a few Docker containers. 
I managed to make them pingable by adding push "route 172.17.0.0 255.255.0.0"to the openvpn server.conf however I cannot connect to any services running on the Docker containers.
$ ping 172.17.0.3

Pinging 172.17.0.3 with 32 bytes of data:
Reply from 172.17.0.3: bytes=32 time=29ms TTL=63
Reply from 172.17.0.3: bytes=32 time=29ms TTL=63
Reply from 172.17.0.3: bytes=32 time=30ms TTL=63
Reply from 172.17.0.3: bytes=32 time=29ms TTL=63

Ping statistics for 172.17.0.3:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 29ms, Maximum = 30ms, Average = 29ms

$ ssh 172.17.0.3
ssh: connect to host 172.17.0.3 port 22: Connection timed out

A:

My networking teacher has helped me. The solution was to add these iptables rules:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 172.17.0.1
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT

