Routing all client traffic through the VPN on client side

Need help configuring your VPN? Just post here and you'll get that help.

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
bahador_b_92
OpenVpn Newbie
Posts: 9
Joined: Wed Feb 24, 2016 11:09 am

Routing all client traffic through the VPN on client side

Post by bahador_b_92 » Thu Apr 07, 2016 12:21 pm

Hi,

I have read the howto and I know that I can route all client traffic through the VPN by putting

Code: Select all

push "redirect-gateway def1"
in my server configuration. But what if the server doesn't contain this line and I want to do it on client configuration?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Routing all client traffic through the VPN on client sid

Post by Traffic » Thu Apr 07, 2016 12:51 pm

client config:

Code: Select all

redirect-gateway def1
However, if the server is not setup to function as your client default gateway then it will not work.

bahador_b_92
OpenVpn Newbie
Posts: 9
Joined: Wed Feb 24, 2016 11:09 am

Re: Routing all client traffic through the VPN on client sid

Post by bahador_b_92 » Thu Apr 07, 2016 2:44 pm

Traffic wrote:client config:

Code: Select all

redirect-gateway def1
However, if the server is not setup to function as your client default gateway then it will not work.
Thanks for answering.

I seems that the server wasn't configured in a way to allow me to redirect all my traffic through the connection :( .

Now the opposite scenario. I have used

Code: Select all

--route-noexec
on my client configuration for a server that DOES

Code: Select all

push "redirect-gateway def1"
. The client config works fine on a windows or linux machine, NOT redirecting all the traffic, however when I use the same config file on my android phone with "OpenVPN Connect" app, it REDIRECTS all the traffic and apparently ignores

Code: Select all

--route-noexec
. Should I make a new post for this?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Routing all client traffic through the VPN on client sid

Post by Traffic » Thu Apr 07, 2016 8:05 pm

bahador_b_92 wrote:when I use the same config file on my android phone with "OpenVPN Connect" app, it REDIRECTS all the traffic
Check your Connect log for errors ..

Post Reply