[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Web openvpn.net

Re: [Openvpn-devel] Changing routes on the client

  • Subject: Re: [Openvpn-devel] Changing routes on the client
  • From: Eric Limpens <eric@xxxxxxxxxxx>
  • Date: Tue, 25 Apr 2006 17:17:27 +0200

On Tue, 25 Apr 2006 10:00:20 +0200
Eric Limpens <eric@xxxxxxxxxxx> wrote:

> Hello, 
>  I've made a (win32) app which (tries to) alter the routes on the
>  client using the 'up' statement.


>  Is it possible, to add an option to the behaviour of the 'push
>  redirect-gateway' which takes care of the above? The current 'def1'
>  and 'local' options don't quite get the job done.

Digging thru the sources, I've found a more convenient way by adding a
new flag to the redirect-gateway option.
When set, it uses 'add_route3' to re-route all (local) traffic to the 
remote endpoint: 

add_route3(0xc08a0500, 0xffffff00, rl->spec.rmote_endpoint, tt, flags, es)

However the 2 first parameters should be determined by the os.. For
testing purposes I've hardcoded them, things work as expected.

My question: does anyone have pointers how to obtain the local-net and netmask?


OpenVPN mailing lists