OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • OpenVPN Redirect Gateway - Option from Client
« previous next »
  • Print
Pages: [1]

Author Topic: OpenVPN Redirect Gateway - Option from Client  (Read 17447 times)

Heathy65

  • Newbie
  • *
  • Posts: 36
  • Karma: 2
    • View Profile
OpenVPN Redirect Gateway - Option from Client
« on: November 05, 2017, 11:23:00 pm »
I have OpenVPN on OPNsense installed and working with the Redirect Gateway option enabled in the server so all traffic from my clients (iPhone & Mac) is routed via the VPN connection.  This is what I want when I'm connected to public Wi-Fi services etc.  However I have another use case when I just want specific traffic to route via the VPN and other "Internet" traffic not not do this.

Is there any way to set this from the client side (I'm using the OpenVPN client on my iPhone & Viscosity on my Mac).  I'm sure I could achieve this "manually" on Mac by manipulating the routing table but not on the iPhone?

One messy/alternative solution I thought of is having two OpenVPN servers configured on OPNsense, one configured each way.
Logged

xinnan

  • Full Member
  • ***
  • Posts: 125
  • Karma: 13
    • View Profile
Re: OpenVPN Redirect Gateway - Option from Client
« Reply #1 on: November 06, 2017, 04:45:00 pm »
Quote from: Heathy65 on November 05, 2017, 11:23:00 pm
One messy/alternative solution I thought of is having two OpenVPN servers configured on OPNsense, one configured each way.

Not sure why that is messy?  Thats exactly what I would do. 
Logged

NilsS

  • Full Member
  • ***
  • Posts: 174
  • Karma: 18
    • View Profile
Re: OpenVPN Redirect Gateway - Option from Client
« Reply #2 on: November 06, 2017, 07:06:09 pm »
you can eithter only set the redirect gateway option on "client specific overrides" or remove the redirect gateway in the client ovpn file with
Code: [Select]
route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway
https://community.openvpn.net/openvpn/wiki/IgnoreRedirectGateway
Logged

sofien

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: OpenVPN Redirect Gateway - Option from Client
« Reply #3 on: May 23, 2018, 02:39:48 pm »
were you been able to fix you concern?
« Last Edit: May 23, 2018, 02:44:44 pm by sofien »
Logged

sofien

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: OpenVPN Redirect Gateway - Option from Client
« Reply #4 on: May 23, 2018, 02:43:26 pm »
Were you be able to forward all traffic through your tunnel? did you find a way to indicate which traffic need to goes through the vpn?
Quote from: Heathy65 on November 05, 2017, 11:23:00 pm
I have OpenVPN on OPNsense installed and working with the Redirect Gateway option enabled in the server so all traffic from my clients (iPhone & Mac) is routed via the VPN connection.  This is what I want when I'm connected to public Wi-Fi services etc.  However I have another use case when I just want specific traffic to route via the VPN and other "Internet" traffic not not do this.

Is there any way to set this from the client side (I'm using the OpenVPN client on my iPhone & Viscosity on my Mac).  I'm sure I could achieve this "manually" on Mac by manipulating the routing table but not on the iPhone?

One messy/alternative solution I thought of is having two OpenVPN servers configured on OPNsense, one configured each way.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 17.7 Legacy Series »
  • OpenVPN Redirect Gateway - Option from Client
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2