Hi Michael,

Thanks for the OpenVPN hint, that did it, works like a charm!
Here is what i did, if one comes into same troubles:

Given my network scheme as shown, i wanted to reach the outside
world from the VM inside my WinXP laptop, but (as this is done
with the NAT vbox adapter) also reach the VM from the laptop
and the rest of the internal net:

┌-------------┐
| Workstation |
|             |------ WLAN -----┐
| (WinXP Sp2) |  192.168.2.100  |
└-------------┘                 |
   192.168.1.1                   |   ┌---------------┐
        |                        |   |  WLAN Router  |
       LAN                       |---| 192.168.2.1   |--- INet
        |                        |   | (DHCP)        |
   192.168.1.2                   |   └---------------┘
┌-------------┐                 |
| Laptop      |  192.168.2.107  |
|             |------ WLAN -----┘
| (WinXP Sp2) |
|             |
|┌-----------┐|
||    VM     ||
|| (Debian)  ||
|└-----------┘|
└-------------┘

As Michael suggested, i looked into OpenVPN, and followed instructions
from here

http://vbox.innotek.de/pipermail/vbox-users/2007-February/000723.html

and here

http://openvpn.net/static.html

but added the LAN routing to my workstation (see below 'route 192...')

__
1. Installed openvpn on the laptop and the VM.
2. Created the key with
   openvpn --genkey --secret static.key
and transferred it to the VM (mounted an .iso).

For the laptop (WinXP), i used the GUI version 
(http://openvpn.net/gui.html) - you see i come from windows -
and started openvpn with the following config:

(i renamed the network interface, that is created at installation
default 'Local Area Connection' to 'VPN')

dev tun
dev-node VPN
iconfig 10.8.0.1 10.8.0.2
secret static.key
ping-timer-rem
persist tun
persist key

For the debian-VM:
(10.0.2.2 is the NAT-adapter from vbox)

remote 10.0.2.2
dev tun
iconfig 10.8.0.2 10.8.0.1
secret static.key
route 192.168.1.0 255.255.255.0
keepalive 10 60
ping-timer-rem
persist tun
persist key

3. started both:
   openvpn static.ovpn

4. On my Workstation added the route to the OpenVPN-Server (laptop),
as described in http://openvpn.net/static.html (bottom):
   C:\>route add 10.8.0.2 192.168.1.2 -p

5. Tadaa!
Now i can reach the Internet from my VM via the default NAT-Settings
in virtualbox.
+ Reach the VM from the workstation via 10.8.0.2
+ Reach the VM from the laptop via 10.8.0.2

As you might recognize, i am quite impressed of myself, being a linux
and networking newbie :)
So i know this is not the safest and most flexible layout, but it works.
Comments are welcome!

Thanks again, cheers
Lin









_______________________________________________
vbox-users mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-users

Reply via email to