Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-09 Thread Selva Nair
On Thu, Jul 9, 2015 at 7:45 AM, Jan Just Keijser wrote: > as usual, Gert is right :( > I've added an explicit /32 route to the OpenVPN server via DHCP , which > Windows picks up, including the right LAN GW address *BUT* it associates > it with the VPN interface, not the regular LAN interface. Thu

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-09 Thread Jan Just Keijser
Yo, Gert Doering wrote: Hi, On Wed, Jul 08, 2015 at 06:26:33PM +0200, Jan Just Keijser wrote: AFAICT windows does support that option (that's what I was referring to with options 121 or 249) . OTOH, I am *not* sure if it allows you to set a 0.0.0.0/1 route using that option, but I guess th

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-08 Thread Gert Doering
hi, On Wed, Jul 08, 2015 at 02:22:36PM -0400, Selva Nair wrote: > On Wed, Jul 8, 2015 at 12:26 PM, Jan Just Keijser wrote: > > > FWIW: I've patched openvpn to set routes using DHCP on Windows and yes, > > it works: I can add any route to the system routing tables, including > > 0.0.0.0/1 and 128

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-08 Thread Gert Doering
Hi, On Wed, Jul 08, 2015 at 06:26:33PM +0200, Jan Just Keijser wrote: > >AFAICT windows does support that option (that's what I was referring > >to with options 121 or 249) . OTOH, I am *not* sure if it allows you > >to set a 0.0.0.0/1 route using that option, but I guess there's only > >one wa

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-08 Thread Selva Nair
On Wed, Jul 8, 2015 at 12:26 PM, Jan Just Keijser wrote: > > FWIW: I've patched openvpn to set routes using DHCP on Windows and yes, > it works: I can add any route to the system routing tables, including > 0.0.0.0/1 and 128.0.0.1/1 ; this could be used as an alternative to > requiring elevated p

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-08 Thread Jan Just Keijser
Hi, Jan Just Keijser wrote: On 03/07/15 15:15, Gert Doering wrote: On Fri, Jul 03, 2015 at 01:56:39PM +0200, JÁKÓ András wrote: yes this is possible; it's possible to push multiple gateways and multiple (classless) routes (dhcp options 121 & 249). If the metric on the tap-win adapter is set ma

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-03 Thread Jan Just Keijser
Hi, On 03/07/15 15:15, Gert Doering wrote: On Fri, Jul 03, 2015 at 01:56:39PM +0200, JÁKÓ András wrote: yes this is possible; it's possible to push multiple gateways and multiple (classless) routes (dhcp options 121 & 249). If the metric on the tap-win adapter is set manually and is set low eno

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-03 Thread Gert Doering
Hi, On Fri, Jul 03, 2015 at 01:56:39PM +0200, JÁKÓ András wrote: > > yes this is possible; it's possible to push multiple gateways and > > multiple (classless) routes (dhcp options 121 & 249). > > If the metric on the tap-win adapter is set manually and is set low > > enough the redirecting the

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-03 Thread JÁKÓ András
Hi JJK, > > * Can you push several routes via DHCP? Or just a single one? > > If you can push multiple routes, then I'd say we should look into adding > > a check if --redirect-gateway + non-admin privileged user => provide an > > solid warning in the logs that redirecting won't work without pro

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-03 Thread Gert Doering
Hi, On Fri, Jul 03, 2015 at 01:32:32PM +0200, Jan Just Keijser wrote: > > * What about IPv6? > > Can you push IPv6 routes the same way? Will that also work without > > privileges? > > How are IPv6 addresses handled by OpenVPN / tap-win32 ? Calling "netsh.exe" (both for addresses and routes).

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-03 Thread Gert Doering
Hi, On Fri, Jul 03, 2015 at 01:02:56PM +0200, Jan Just Keijser wrote: > It's even possible to run openvpn without admin privileges and set > routes this way! singular route, unfortunlatey - while there is an option to advertise specific routes ("192.168.0.0/24") in DHCP, as far as I understand,

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-03 Thread Jan Just Keijser
Hi David, David Sommerseth wrote: On 03/07/15 13:02, Jan Just Keijser wrote: hi all, whilst writing the TFTP/WPAD patch I stumbled upon the options to set a default gateway and/or routes using DHCP options. I've patched openvpn to also set DHCP option 3 ("gateway") and indeed, windows pic

Re: [Openvpn-devel] Adding routes on Windows using DHCP

2015-07-03 Thread David Sommerseth
On 03/07/15 13:02, Jan Just Keijser wrote: > hi all, > > whilst writing the TFTP/WPAD patch I stumbled upon the options to set a > default gateway and/or routes using DHCP options. > I've patched openvpn to also set DHCP option 3 ("gateway") and indeed, > windows picks up the route supplied to i