How do I use a virtualbox guest machine as a gateway?

1

3

I have a certain problem. I am working on an Ubuntu machine, but I have to use a windows 2003 server guest to connect to a Stonegate VPN to be able to manage our client's website.

I have already asked if I could connect to a Stonegate VPN in Ubuntu, but so far got no answer. And I couldn't connect to it using network manager's strongswan plugin.

So I want to use my guest Win2003 as a gateway to be able to SSH to the remote server. Is that possible?

Thank you very much in advance, if this is possible in any way, it will save me a lot of trouble!

Igor Zinov'yev

Posted 2009-12-25T08:43:21.967

Reputation: 313

Answers

1

To make this work, you would likely need to enable routing on the Windows Guest, and perhaps NAT, and maybe a bunch of routing on the Ubuntu Host.

If all you need is SSH over the VPN, you might consider installing putty and winscp on the windows guest OS, just to keep things simple.

If you have the configuration of the VPN in the Windows Guest OS, you can look at the configuration and figure out how to connect the Ubuntu VPN client to the VPN server. Also, upgrade to the lastest version of Ubuntu - I've seen a great deal of improvement in network support over the past year.

pcapademic

Posted 2009-12-25T08:43:21.967

Reputation: 3 283

Thanks, I have already considered using winscp, maybe I will resort to it after all. – Igor Zinov'yev – 2009-12-26T16:53:22.173

2

It might be possible but you need to test it out.

If your windows connected to Internet with IP_1, VPN create network interface with IP_2.

In the VM, setup the network gateway to the Windows.

Make sure you can ping IP_2 from ubuntu.

In ubuntu, change the default gateway with "route add default gw IP_2" command. You might need to enable routing in Windows: http://www.wikihow.com/Enable-Windows-XP-Routing

The other way is to setup ssh tunnel in Windows. http://www.google.com/search?q=setup+ssh+tunnel&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

tony-p-lee

Posted 2009-12-25T08:43:21.967

Reputation: 591