What i want to do is:
- have an internal network for guest systems / be able to make connections between guests inside network
- have internet connection for guests (to download updates)
- be able to connect to guests with ssh(linux guests)/rdp(windows guests)
My Setup is: Ubuntu oneiric host system using Virtualbox for Virtualizing some guests (linux & windows).
I setup two network adapters for each guest:
- Host-only-networking vboxnet0
I'm trying to setup a openvpn server on the host system to allow connections to the host-only network vmnet0. Giving a public ip address to the guests is not an option for me, as i do not want to have this guests be public accessible and also i do not have enough ip addresses to provide to the guests.
I installed openvpn server and tried both bridging into the vboxnet0, which simply had no connectivity at all, as also using routed ip tunnel:
dev tun server 192.168.56.0 255.255.255.0
with the last config i'm able to connect to the vpn server and get an internal ip address. I'm able to ping the server at 192.168.56.1 but can not ping to the guest (192.168.56.101). If i make the ping from the main server, i can ping to both addresses.
I'm not experienced with iptables, so i did not setup any rules for this, which MAY be the problem. I have tried enabling ipforwarding on the host system (sysctl -w net.ipv4.ip_forward=1), but it did not have any effect.
So my questions are:
- Should the openvpn setup work out of the box, or is it needed to setup some forward rules in iptables?
- If yes, how would the rules look like?
- And simply: what should i do to make it work?