deepthought
Hi,
is there an intrinsic way to only add a route if the client ip and default gateway ip is not within the routing targets? Can this also be pushed from the server side?
Details:
I'm setting up openvpn on a laptop which connects from different networks.
The server also routes between openvpn (say 10.0.0.0/24) and the local nerworks (192.168.0.0/23).
For this to work, it pushes the route to 192.168.0.0/23 to its clients.
However, I'd like to avoid this if the client itself has a physical connection in this ip range.
E.g.:
Client is connected to some wifi on 192.168.0.0/24, which is connected to the internet, via which the vpn server is reached.
Then I'd like to only get pushed a route to 192.168.1.0/24 or - if this is not possible - no route at all.
Regards,
deepthought
deepthought
okay, I think, I got a solution here:
I just push the route to 192.168.0.0/23 to the client unconditionally and if it is connected to 192.168.0.0/24 locally, the more specific route will superseed the more general one.
This won't work, if the local subnet is not smaller than the one routed by the openvpn server. However, I don't expect this to happen in my case.
Regards,
deepthought