How to add routes on windows
Posted: Wed Aug 08, 2012 1:32 pm
Hi,
I have a setup with a Mikrotik router as a server and a windows 7 as client.
The problem is that RouterOS can not push route to the client.
I've read that I should then add to my client .ovpn config file something like
The problem is that the gateway IP is not always the same (winTap that need the gateway and remote on the same /30 subnet). I can not then code the gateway in hard in the file.
I've seen that the gateway IP should be available as an environment variable, however I don't know how to use this variable in the script.
I would appreciate some help how to recover this gateway IP and add the routes I need.
I have a setup with a Mikrotik router as a server and a windows 7 as client.
The problem is that RouterOS can not push route to the client.
I've read that I should then add to my client .ovpn config file something like
Code: Select all
route-up "route add 192.168.0.0 mask 255.255.255.0 10.15.30.31"
I've seen that the gateway IP should be available as an environment variable, however I don't know how to use this variable in the script.
I would appreciate some help how to recover this gateway IP and add the routes I need.