0

I have a mikrotik router working as openvpn server. My problem is mikrotik can't push routes to the clients. Then, I'm wandering if it is possible to add to the client configuration some kind of "include" that downloads configuration lines from http in order to add new routes.

Is it possible? Is there another solution?

The clients will be mostly windows (and some linux)

3 Answers3

1

If your router doesn't fully support OpenVPN pushing routes then the best solution is to get a hardware device that does support pushing routes (and any other config that you may need pushing).

user9517
  • 114,104
  • 20
  • 206
  • 289
0

You can include the route in the openvpn config you give the users like

 route 18.18.18.1 255.255.255.0 vpn_gateway default
Mike
  • 21,910
  • 7
  • 55
  • 79
  • I did this, but sometimes I need to add new routes and change existing ones and I need to resend de .ovpn file to all users. I am searching for a way to make it transparent to the users. – user3099887 Oct 13 '17 at 14:43
0

The openvpn client has the ability to run scripts on a few defined times during connection, including after authentication, after adding routes and even replace the route add commands with a script made by you (which may need to access some environmental variables). Check the details on their documentation on --script-security, --route-up, --route-noexec, --up and --up-delay.

That way you could write a script that would define what routes to create or even download some text from the internet and base the routes on that, even though I'd be concerned by security in this case.

Note that you may not yet have VPN connectivity when running the scripts.

Zip
  • 204
  • 1
  • 7