Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
routing vbox virtual machines [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
hika
Apprentice
Apprentice


Joined: 13 Mar 2009
Posts: 234
Location: Utrecht

PostPosted: Mon May 20, 2013 8:14 pm    Post subject: routing vbox virtual machines [SOLVED] Reply with quote

I have a laptop with Gentoo and Vbox virtual machines. The laptop has three network interfaces to the outside world:
wired, wlan and openvpn (enp4s0, wlp2s0 and tunl0). this works fine.
From the virtual machines (Windows) I want to be able to reach both Gentoo and the outside world through any of the three interfaces. Since I don't know which of the three is active, I need whith bridge mode three separate connections, with NAT mode I can only access the first two and I need to setup vpn from inside windows, creating several tunnels. To access gentoo and the other machines I need the host-only adapter.

All quite complicated, so I thought why not setting up Gentoo as a router for the virtual machine and only use host-only.
So I set it up with iptables and a dns and all works OK, except the router is not routing to the outside world.
If I disable iptables I can ping the virtual machines from the outside but from the virtual machines I don't come farther then the outside ip-number of the physical machine. So it won't route anything coming from the vboxnet0 virtual adapter.
Is this something from vbox or do I need something more?

my home network is 192.168.222.0/24 with gateway 192.168.222.253 and 192.168.222.45 for my laptop
the host-only network is 192.168.56.0/24 with 192.168.56.1 for the vboxnet0 interface
the tunl0 uses 192.168.253.100/30 if I'm correct but is working fine

The routing table from gentoo is with only wired connected:

default 192.168.222.253 0.0.0.0 UG 0 0 0 enp4s0
loopback localhost 255.0.0.0 UG 0 0 0 lo
192.168.56.0 * 255.255.255.0 U 0 0 0 vboxnet0
192.168.222.0 * 255.255.255.0 U 0 0 0 enp4s0

Hika


Last edited by hika on Wed May 22, 2013 3:42 pm; edited 3 times in total
Back to top
View user's profile Send private message
hika
Apprentice
Apprentice


Joined: 13 Mar 2009
Posts: 234
Location: Utrecht

PostPosted: Tue May 21, 2013 2:55 am    Post subject: Reply with quote

I've come one step further. Formulating the problems sometimes helps to look in different directions.
I found it probably is a dns and maybe also wins problem.

I noticed that in the routing information my home gateway was mentioned by dns name and started to wonder if that was correct it said Router-2 and I thought it should be Router-02. On further looking I found that a long time ago I had mistyped the name in my dns, one way it said the one and reverse it said the other. Untill now it had never created a problem.
Now I can ping part of my local network. I have to clear al routing buffers and probably also WINS. Which is a lot of trouble.

Hika
Back to top
View user's profile Send private message
hika
Apprentice
Apprentice


Joined: 13 Mar 2009
Posts: 234
Location: Utrecht

PostPosted: Tue May 21, 2013 8:55 pm    Post subject: Reply with quote

I don't come any further.
From my WindowsXP vurtual machine I can reach:
- The gateway/router (= fli4l Linux box)
- Another Gentoo Linux Workstation
- A Windos virtual machine bridged to the network on the third Linux machine
- The HP printserver
- The Epson printer

I cannot reach
- My Gentoo Linux server with Samba (so also with WINS)
- A windows virtual machine bridged to the network on the second Linux machine
- A third Linux workstation that hasn't been on for a week
- The wireless gateway

Where should I look further, I tried flushing arp and wins tables.
How do I see what it is using? Could it still in part be using that bogus dns-name?

Hika
Back to top
View user's profile Send private message
hika
Apprentice
Apprentice


Joined: 13 Mar 2009
Posts: 234
Location: Utrecht

PostPosted: Wed May 22, 2013 1:16 pm    Post subject: Reply with quote

It is Virtualbox that is interfering. When I tracert in windows it goes through a not existing but existing ip-number.
The hostside is 192.168.56.1. Which I set as gateway. tracert says it goes through 192.168.56.101, which exists but is neither host nor guest. I'm going to look for a way to disable it.

Hika
Back to top
View user's profile Send private message
hika
Apprentice
Apprentice


Joined: 13 Mar 2009
Posts: 234
Location: Utrecht

PostPosted: Wed May 22, 2013 3:40 pm    Post subject: Reply with quote

It's weird but a full reboot solved it 192.168.56.101 has gone and I have route added in Linux
link-local * 255.255.0.0 U 206 0 0 vboxnet0
Also the metrics for default, enp4s0 and wlp2so have gone up.
I haven't tested the ovpn but I guess that works too.

Hika
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum