Open Xplouder opened 4 years ago
Hi, how exactly are deployed 10.10.10.2, 192.168.1.74 and 192.168.2.10? Are they running in a docker container (if so, are they configured in a docker network)?
They are not in the docker network, imagine those 3 as simple machines without docker.
Check ping routing using traceroute. Could be that *.10.2 is using vpn host to route 192.168.* packages? We have to discard all options.
Here is the traceroute from the VPN client.
Ignore the 172.30.0.1, I just restarted the docker network and is assigned a new subnet but the previous one which matches the above diagram is 172.28.0.1.
So seems like you said, it is using the VPN Host to do the routing... but why? Since my ovpn_genconfig
's generated configs are pretty standard.
Ok, are you using docker default network in your VPN server? or did you create an isolated docker network? I think docker creates iptable rules to forward packages to VPN host when you use the default network (bridge).
Updated the original post to include the docker-compose.yaml that I'm using. And yes I have a named network but it is bridged by docker default.
Looking at your network schema, VPN server doesn't have direct routing to 192.*, so it uses its default route (VPN host), packages go through VPN host and from there, to 192.*. If you don't want that, either change default route of your VPN server or create an explicit iptables rule (VPN host) to drop packages coming from VPN server and pointing to 192.* subnets.
Greetings!
So I have this network architecture from a very basic
ovpn_genconfig
generated configs:openvpn.conf
ovpn_env.sh
docker-compose.yaml
What I was expecting:
push "route 192.168.2.0 255.255.255.0"
to allow the clients "see" 192.168.2.0/24What I get:
Why is this happening? I did not include the IPTable rules, which I did not change from the default ones generated from docker or this image itself but if you feel like you need it to debug too let me know.
Thank you.