Changing routes on the client
Hello,
I've made a (win32) app which (tries to) alter the routes on the client using the 'up' statement.
With the information in the environment and the command line parameters I've tried to 'hide' the local network from the client.
The purpose is to prevent users to communicate with their own equipment when they are using a VPN connection.
So, when a client has an IP address 192.168.1.10, in the subnet 192.168.1.0/24, I want to route all traffic to the 192.168.1.0/24 network thru the VPN server. This might not seem logic, but we want to prevent people to communicate with other equipment when connected to the VPN.
The app tries to detect the current (physical) interface being used to get connected, and retrieves the network by using the GetAdaptersInfo function.
When I insert a new route, using the interface index of the Tap interface, the CreateIpForwardEntry function failes (probably because the interface doesn't exist already?).
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.
Eric
Quoted 6 lines · On Tue, 25 Apr 2006 10:00:20 +0200 Eric Limpens <[email protected]...> wrote:
Hello,
I've made a (win32) app which (tries to) alter the routes on the client using the 'up' statement.
<snip>
Quoted 3 lines
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?
Eric
[Openvpn-devel] Any news about WinCE porting?
In reply to Eric LimpensHi, i wanted to know if the WinCE TAP rewriting had any news... Thanx a lot
RE: [Openvpn-devel] Any news about WinCE porting?
Quoted 1 line
-----Original Message-----
(...)
Quoted 2 lines
Hi, i wanted to know if the WinCE TAP rewriting had any news... Thanx a lot
(...)
I release the first alpha a couple weeks ago (well 1.5 weeks ago):
Here's the main page I set up; links therein to binaries, source, and a forum kindly set up by Krzysztof Sobolewski:
http://www.ziggurat29.com/OVPNPPCAlpha/OVPNPPCAlpha.htm
Short story:
TAP driver largely works fine but there has been a report that it doesn't load on an Axim x51v, which I don't have on-hand to test.
The GUI, aka 'Connection Manager', provides a serviceable interface for starting/stopping VPN interfaces, though it is a bit bare-bone. I should be doing another build in the next day or so which will have a lot more of the stuff in the management interface exposed for useability.
If you'd like to give it a whirl that would be great, especially for the feedback on problems/suggestions.
-Dave
Quoted 5 lines · On Tue, 25 Apr 2006 17:17:27 +0200 Eric Limpens <[email protected]...> wrote:
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:
Quoted 8 lines
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?
Anyone to enlighten me?
It appears the rl->spec.net_gateway is the original gateway and rl->spec.remote_endpoint is the address I'ld like to route all traffic to.
I'm still missing the netmask for the original network. Is there an easy way to retrieve this?