How to add routes on windows

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
patrickovpn
OpenVpn Newbie
Posts: 5
Joined: Sat Dec 04, 2010 2:21 am

How to add routes on windows

Post by patrickovpn » 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

Code: Select all

route-up "route add 192.168.0.0 mask 255.255.255.0 10.15.30.31" 
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.

volans
OpenVpn Newbie
Posts: 1
Joined: Thu Nov 21, 2013 12:49 pm

Re: How to add routes on windows

Post by volans » Thu Nov 21, 2013 12:51 pm

I've exact the same problem. Have you found a solution?

Post Reply