LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-14-2016, 12:42 PM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,750
Blog Entries: 4

Rep: Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965Reputation: 3965
Getting a VirtualBox VM to use the host's VPN connection to somewhere-else


(Sigh ...) I know that I am tantalizingly close to doing what I want here, but not quite.

I have a VirtualBox VM running on an OS/X host, and the VM has two adapters: a Bridged adapter (for connecting to the Internet), and a Host-Only adapter.

If I open a VPN tunnel and "ping" a remote address from the host, it pings just fine.

If I do the same thing from the VM, it does not. When the traffic goes out of the Bridged adapter, it obviously bypasses the host's stack and tries to ping a server that ... of course, it cannot reach.

Well then, I'm sure that I need to use the host-only adapter in some way. I can, for example, add a route that goes through that device (vboxlan0), and, sure enough, pings will show up on that ... the host-only network adapter.

I guess that the piece that I'm missing is how to get the traffic on the host-only adapter to be sent to the [virtual ...] gateway-address that leads through the VPN tunnel.

Let's say that the traffic from the VM, on the host-only network, pops out at 192.168.56.101. I can see that on the host's "vboxnet0" ifconfig-entry. But, where it now has to go is the tunnel, which is on the host's "tun0" entry.

What am I missing?
 
Old 04-14-2016, 02:53 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,047

Rep: Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632
I's swap out bridged for nat and remove host only.
 
Old 04-15-2016, 06:15 PM   #3
MikeDeltaBrown
Member
 
Registered: Apr 2013
Location: Arlington, WA
Distribution: Slackware
Posts: 96

Rep: Reputation: 10
Most likely a routing issue and possibly an "inside the tunnel" or "outside the tunnel" problem, which, of course, points back to routing.

What are the network/masks for all of the segments?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to change vpn connection if slow vpn connection andrew44 Linux - General 2 02-23-2014 11:25 AM
VirtualBox: Slackware64 host and guest; NFS mount from host fails catkin Linux - Virtualization and Cloud 0 11-15-2010 06:54 AM
WinXP VM on VirtualBox CentOS Host - no response of host during install?! ascfu Linux - Software 1 12-10-2009 12:45 PM
Establishing a VPN connection (host to host) using IPSec services adithya24 Linux - Networking 9 06-10-2009 08:44 AM
VPN in/nix passing connection to another host. phatboyz Linux - Networking 0 12-31-2004 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration