Route add in windows client

How to customize and extend your OpenVPN installation.
sgtoartilleria
OpenVpn Newbie
Posts: 1
Joined: Fri Mar 31, 2017 10:59 pm

Route add in windows client

Postby sgtoartilleria » Fri Mar 31, 2017 11:07 pm

Hi, in client config the command "route-up" don´t work.

route-up "C:\\Windows\\System32\\ROUTE.EXE ADD 10.166.0.0 MASK 255.255.0.0 192.168.77.1"
Options error: --route-up script fails with 'C:\Windows\System32\ROUTE.EXE ADD 10.166.0.0 MASK 255.255.0.0 192.168.77.1': No such file or directory

route-up "ROUTE add 10.166.0.0 mask 255.255.0.0 192.168.77.1"
Options error: --route-up script fails with 'ROUTE add 10.166.0.0 mask 255.255.0.0 192.168.77.1': No such file or directory

Any solution?

Best regards

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2235
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route add in windows client

Postby TinCanTech » Sat Apr 01, 2017 11:58 am

Try like so:

Code: Select all

route-up "C:/Windows/System32/ROUTE.EXE ADD 10.166.0.0 MASK 255.255.0.0 192.168.77.1"

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2235
Joined: Fri Jun 03, 2016 1:17 pm

Re: Route add in windows client

Postby TinCanTech » Sat Apr 01, 2017 12:57 pm

A simpler way would be to add to your client config file:

Code: Select all

route 10.166.0.0 255.255.0.0 192.168.77.1


Return to “Scripting and Customizations”

Who is online

Users browsing this forum: No registered users and 1 guest