I have an OpenVPN connection (point to point). When program connects to server it gets IP and Gateway dynamically, from server.
I need to make windows add route to my secure server through given gateway. For example open VPN gives IP: 192.168.100.2, gw: 192.168.100.1. My secure server's IP is 10.0.0.1, i need to make them connected. My router, he's also working as open vpn server (MIKROTIK) see both of them, i can connect them using command route add 10.0.0.1 mask 255.255.255.255 192.168.1.1, but openVPN can give different IP and gateway for different user. I want to make windows add route to DHCP specified gateway. Virtual adapter's interface number is 19, i've tried to add route like this: route add 10.0.0.1 mask 255.255.255.255 0.0.0.0 metric 1 if 19, but if i do route print after that it shows that my route has ~31 metric, that's more than metric for my internet connection, and it's impossilbe to reach this route.
sorry for long post, i don't know how to explain better (if i knew, i'd asked google).
p.s. as temporary solution i've made openvpn server give same ip and gateway for two users, but it's not a good solution.
UPD: User on windows 7 machine don't have administrator rights, so OpenVPN is unable to add routes.