[SOLVED] How to push all the traffic through the VPN server?

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Locked
darkman088
OpenVpn Newbie
Posts: 2
Joined: Wed Feb 29, 2012 12:18 am

[SOLVED] How to push all the traffic through the VPN server?

Post by darkman088 » Wed Feb 29, 2012 12:29 am

Hello,

Due to hardware incompatibility I'm now forced to switch from Linux to Windows 7.
PLEASE let's discuss client side ONLY, as I don't have any control over the server.
Under Linux, when I connect to the VPN, all the traffic was routed through the VPN
and when checking my IP address on known sites (i.e. ipaddress.com) I was seeing
the IP address of the VPN server.
Now I have installed OpenVPN 2.2.2 under Windows 7. YES, I am running it as Admin,
but ipaddress.com shows my IP address directly!
I have searched for solutions and I did this: Right click on the OpenVPN icon, Edit
config and I have added the following line to my config:

push "redirect-gateway def1"

This didn't work, and as I am connected over a wireless router, I modified the line
to this:

push "redirect-gateway local def1"

Most unfortunately, this doesn't work. Although, with modifying the routes, I am able
to get all the traffic rerouted and I see the server's IP on ipaddress.com. Although doing
this every time is a big hassle and I would kindly ask you for a simpler setting / solution.

P.S.: Please write detailed explanations, as networking is by far my weakest side :-/

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: How to push all the traffic through the VPN server ???

Post by janjust » Wed Feb 29, 2012 9:59 am

if you're talking only about the *client* side then you should use

Code: Select all

redirect-gateway def1
(i.e. without the 'push'): you can only 'push' stuff from server to client.

darkman088
OpenVpn Newbie
Posts: 2
Joined: Wed Feb 29, 2012 12:18 am

Re: How to push all the traffic through the VPN server ???

Post by darkman088 » Wed Feb 29, 2012 1:45 pm

Hello,

thanks a million!! Just I found it out with the help of a friend several hours ago.
Anyway, THANKS, this is the correct answer!
I was searching the net a lot, but didn't find it anywhere... So, for others suffering this, it really solves the problem :-)

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: How to push all the traffic through the VPN server ???

Post by janjust » Wed Feb 29, 2012 2:27 pm

excellent news, thx for sharing & closing topic

Locked