LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-22-2016, 02:30 PM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,706
Blog Entries: 4

Rep: Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949
Question Connecting to VirtualBox VM from OpenVPN connection hosted on same machine


Well, my previous post wasn't solved, after all...

I am trying to connect to a VirtualBox VM from a remote, through an OpenVPN tunnel that is hosted by the same computer.

If I am logged-on to that computer, e.g. by VNC or SSH, then I am able to ping the VM (which has a "bridged" adapter #2 ...) at 192.168.1.183. When running WireShark on that machine, I see both the ICMP ping request (from host 192.168.1.199), and the ICMP ping reply.

If I now attempt to ping that same address from my own computer, which is connected through the tunnel, I see an ICMP ping request, this time from 10.44.55.66 [i](the VPN-assigned address of my computer), but no reply.

I would conclude from this that the packets aren't making it.

Just for kicks, I tried issuing route add -host 19.168.1.183 192.168.1.199, but this is clearly incorrect: now the packets just come flying back to me and don't show up in Wireshark at all. (If I use -net, I simply get "time-to-live exceeded" and once again no packets show up.)

I'm beginning to wonder if I must do something with static routes on the office router ... as I had to do in order to get VPN to work, for instance. Do I have to, say, route packets that are addressed to 192.168.1.183 to 192.168.1.199, on that router?
 
Old 03-23-2016, 08:18 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,706

Original Poster
Blog Entries: 4

Rep: Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949
The problem remains un-resolved but here's a few more things about it:

(1) The VM does, indeed, appear on the local network and it can be accessed from there. Also, I can ssh (or telnet) to the device, through the tunnel, and from that (local) session ping any virtual network-adapter of the VM. But I still cannot ping it through the tunnel. I see how the VM has a promiscuous-mode adapter setting (on the host ...) to allow it to receive traffic not intended for it and to thereby mimic a second physical box on the local network.

(2) I set up a "Host-Only Network" (vboxnet0, if I recall ...), and see that listed as an interface in the host's ifconfig output. I see that this is handled by "virtualbox." Once again, I can ping that adapter when I am logged-in to the box. But, I cannot ping even that adapter from the other side of the tunnel.

I'm still scratching my head about why this isn't working, and what to do about it.
 
Old 03-23-2016, 11:59 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,706

Original Poster
Blog Entries: 4

Rep: Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949
Well, I also "solved" this one ... and I'm still not quite sure what was wrong.

The VM has two interfaces: one NAT, and one Host Only (which I defined as an experiment in connecting to it ...). Both of these IPs can be pinged from the host.

I finally succeeded in being able to ping the public (NAT ...) address of the VM, while connected through the tunnel. I'm honestly not sure why it did not work before.

I have not been able to ping the Host Only address, even though I am tunneling to the same machine that hosts both OpenVPN and VirtualBox. But I did not entirely expect to be able to do so.
 
  


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
how to connect a remote usb device to a centos hosted virtualbox vm? OuldeFauder Linux - Virtualization and Cloud 7 11-02-2017 05:33 AM
Connecting to OpenVPN and sharing that connection to another VPN as server depam Linux - Software 2 01-22-2013 07:42 AM
Move Slackware guest from a Slackware hosted Virtualbox to Windows hosted Virtualbox? damgar Slackware 1 08-07-2012 11:28 PM
multiple openvpn connection in same machine. sodoojin Linux - Newbie 1 05-21-2009 08:15 PM
OpenVPN Question : connecting 5-6 comps with OpenVPN duryodhan Linux - Networking 7 02-15-2007 10:28 PM

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

All times are GMT -5. The time now is 09:56 AM.

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