Using VPN Connection of Guest

Discussions related to using VirtualBox on Linux hosts.
Post Reply
snntrable
Posts: 1
Joined: 29. Jan 2015, 17:23

Using VPN Connection of Guest

Post by snntrable »

Hi there,

if have the following setup:

Host: Ubuntu 14.04
Guest: Windows 8
Network: NAT

The purpose of the guest system ist solely establishing a VPN connection to some other network. The VPN Client is Check Point Endpoint Security.

Is there any way to make an ssh connection to a server in the VPN from the HOST system?

Cheers and Thank you!

snntrable
Smackey's dad
Posts: 127
Joined: 2. Apr 2014, 04:11
Primary OS: Ubuntu 12.04
VBox Version: OSE Debian
Guest OSses: Ubuntu Trusty
Location: Austin, TX
Contact:

Re: Using VPN Connection of Guest

Post by Smackey's dad »

Here is how I would proceed, although it may take a few permutations to get this right
  • Create a Bridged Network for VPN access
    Create a Host-only network
    Modify routing table on host such that the VPN subnet (target remote server subnet) is sent through the host-only network route
    Modify routing table on guest such that the incoming request for remote servers gets routed to the VPN network interface (this may be automatic)
Even though the above may not work as-is, it should give you an idea on how to proceed.
sasha_
Posts: 1
Joined: 10. Feb 2017, 17:36

Re: Using VPN Connection of Guest

Post by sasha_ »

This is old topic, but if someone else finds it, as I did when trying to figure this one out:

- Setup windows guest with Bridged Adapter
- Record guest's IP address
- install Checkpoint client and connect

When connected to VPN , use putty in windows guest.
In putty go to SSH > Tunnels and set these
- Local Ports Accept
- Source Port 222 (any unused port you want)
- Destination: Dynamic, Auto
Save session and connect

If your connection is ok, you can now connect from linux host:

ssh user@REMOTE.HOST.NAME -ProxyCommand='nc -X 5 -x VIRTUAL.BOX.GUEST.IP:222'

It might be convenient to add this to .ssh/config

Host AnyNameYouWish
HostName REMOTE.HOST.NAME
User user (this is user @ REMOTE.HOST.NAME , optional)
ProxyCommand=nc -X 5 -x VIRTUAL.BOX.GUEST.IP:222 %h %p
ServerAliveInterval 10

Then you can use ssh like this
ssh AnyNameYouWish
Post Reply