We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How to add route to OpenVPN automatically?

Medium Priority
4,183 Views
Last Modified: 2012-05-11
Hi Experts,

I have a fully functional OpenVPN setup, but can't figure out how to add a route on a Windows 7 64bit workstation.

The route adds well on a Windows XP workstation - there's a route.exe file and "up" file that has the actual route information (route add 192.168.1.0 mask 255.255.255.0 172.1.1.1). It works for XP, but for Win 7 complaints that the route.exe is not a 64bit application, and is not compatible.

How would I add a route to Win7 64bit automatically?

Thanks in advance!
Comment
Watch Question

Author

Commented:
Great! Thank you.

Could you please let me know how I can add multiple routes to the OpenVPN?

I tried adding several of them, but only the last one actually goes through.

route-up "route add 192.168.1.0 mask 255.255.255.0 172.88.88.1"
route-up "route add 192.168.2.0 mask 255.255.255.0 172.88.88.1"
route-up "route add 192.168.3.0 mask 255.255.255.0 172.88.88.1"

Thank You!
"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks.

I'm using MikroTik router as an OpenVPN servers, and it seems that it may not allow "pushing" the route to clients. The only way that I know of is to include the routes in Client's config, which is what i'm doing.

So, I need these commands to work with Windows/cmd... It doesn't look like "route or push" would work in CMD. :)

I can't use /22 because it would include the networks from which the Clint may be connecting from... (the ips of my remote network is actually 192.168.32.0, 33.0, etc).

Thank You.
Qlemo"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015

Commented:
For client config see the second part of my post - just insert that into the client config file.

Author

Commented:
Thank you!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.