Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to add route to OpenVPN automatically?

Posted on 2011-04-22
6
Medium Priority
?
3,264 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!
0
Comment
Question by:Kaptain1
  • 3
  • 2
6 Comments
 
LVL 1

Author Comment

by:Kaptain1
ID: 35451848
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!
0
 
LVL 72

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 35453015
You usually do not use route-up, unless you need to run scripts for dynamic routing or the like. In your case, you should either push the routes in the server config:
push "route 192.168.1.0 255.255.255.0"
push "route 192.168.2.0 255.255.255.0"
push "route 192.168.3.0 255.255.255.0"

Open in new window

or use the corresponding commands in the client config:
route 192.168.1.0 255.255.255.0
route 192.168.2.0 255.255.255.0
route 192.168.3.0 255.255.255.0

Open in new window

Any reason why you don't just route 192.168.0.0/22 (255.255.252.0)?
0
Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

 
LVL 1

Author Comment

by:Kaptain1
ID: 35453654
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.
0
 
LVL 72

Expert Comment

by:Qlemo
ID: 35454359
For client config see the second part of my post - just insert that into the client config file.
0
 
LVL 1

Author Closing Comment

by:Kaptain1
ID: 35454781
Thank you!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question