Manage Traffic To OpenVPN Server

Hi All

I have installed the OpenVPN server and I have installed the openvpn gui on XP SP2 the client connects successfully..I need to achieve the following scenario..I want some traffic to some specific server to go through the VPN server while I want all other Internet traffic to go through the ISP.

Route A : XP   VPN Interface> (VPN Interface) + ( public IP + Interface) VPN Server --> Servers with same public IP subnet like VPN server
Route B:  XP ethernet Interface class C IP --> Gateway --> ISP --> Internet

I want to start the VPN connection and have all traffic to my pulic servers routed through VPN and all the traffic for the Internet to pass through the ISP.

I have used the redirect-gateway directive but that did pipe all traffic to the Internet through the VPN server.

I have used push 'route' that allowed me to pipe Internet traffic through the ISP but all traffic to timed out even though I have masquerading and ip forwarding enabled on the OpenVPN server..

Any suggestions ?

LVL 19
http:// thevpn.guruAsked:
Who is Participating?
arrkerr1024Connect With a Mentor Commented:
You're on the right track.

When you used redirect-gateway and all traffic went over the VPN were you able to access your network and the internet (going over the vpn of course)?  Remember that machines on your network need to know how to communicate with your VPN network, so either the VPN server has to be their default gateway, their gateway needs to have a route back to the VPN server for VPN traffic, or they need static routes set on them to get back, or the VPN server needs to NAT the traffic.

Try taking out all route directives and connecting to the vpn and make sure you can connect to the internet.  Then use the windows route commands to modify your route and add the network with the remote side of your VPN as the gateway.
http:// thevpn.guruAuthor Commented:
I would really prefer a server side solution because this VPN client is going to be distributed to more than 30 users...I liked the static route idea..if I add static routes on my servers telling them to send traffic to to the VPN server would that work..?
http:// thevpn.guruAuthor Commented:

I have done research..please check with me the following

I am on a network and the OpenVPN is on the Internet on another network with no push options and gateway redirects..I can ping from the client if I establish a VPN network connection, and if I trace the connection to the public IP of the server it goes through my ISP>

If I do push my public network then I can neither ping nor the VPN server although the routing table of the OpenVPN server has an entry to send data to the network through tun 0

[root@localhost ~]# route -n | grep 10.8.0 UH    0      0        0 tun0   UG    0      0        0 tun0

So it should know that packets coming from should be sent back through tun0..right ?


tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:  P-t-P:  Mask:
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

As for the client routing table..

C:\Documents and Settings\ali.jawad>netstat -r

Route Table
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 19 b9 24 df 85 ...... Broadcom NetXtreme 57xx Gigabit Controller - Pac
ket Scheduler Miniport
0x3 ...00 ff 0a 6e 17 9b ...... TAP-Win32 Adapter V8 - Packet Scheduler Miniport

0x4 ...00 ff db 1b 6a d1 ...... TAP VPN Adapter - Packet Scheduler Miniport
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
       20       1       30       30       30       1       1       20       20       20       30       20               4       1       1       1
Default Gateway:
Persistent Routes:


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.