Network problems between host and guest

Discussions about using Linux guests in VirtualBox.
Post Reply
Krauser Joestar
Posts: 3
Joined: 5. May 2011, 09:22
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu

Network problems between host and guest

Post by Krauser Joestar »

Hey there everyone, first time posting here.


Here's the deal, i'm working on an enterprise and i'm using ubuntu in a virtualbox, with windows 7 as the host. Now, i wanted to show some of my php pages to everyone connected to the internal network but i can't even ping or connect my web page done on the guest when i'm using my host.

I'll put here everything that i did:

First thing, i set up the adapter network to bridged adapter
then....

# etc/network/interfaces


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth0:1
iface eth0:1 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
# /etc/apache2/sites-available/***
<VirtualHost 192.168.0.2>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/mypaste
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
#ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:d4:3c:f8
inet6 addr: fe80::a00:27ff:fed4:3cf8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:11273 (11.2 KB)

eth0:1 Link encap:Ethernet HWaddr 08:00:27:d4:3c:f8
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:91 errors:0 dropped:0 overruns:0 frame:0
TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8369 (8.3 KB) TX bytes:8369 (8.3 KB)
#ipconfig
Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : deeca.ineti.pt
Link-local IPv6 Address . . . . . : fe80::e8e4:b28f:3d87:fa
IPv4 Address. . . . . . . . . . . : 10.64.46.20
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 10.64.47.254

Wireless LAN adapter Wireless Network Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::864:2178:5954:575
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
#pinging my host ip from my guest
ping 10.64.46.20
PING 10.64.46.20 (10.64.46.20) 56(84) bytes of data.
From 192.168.0.2 icmp_seq=1 Destination Host Unreachable
From 192.168.0.2 icmp_seq=2 Destination Host Unreachable
From 192.168.0.2 icmp_seq=3 Destination Host Unreachable
#pinging my guest ip from my host
Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.234.250: TTL expired in transit.
Reply from 192.168.234.250: TTL expired in transit.
Reply from 192.168.234.250: TTL expired in transit.
Reply from 192.168.234.250: TTL expired in transit.
Krauser Joestar
Posts: 3
Joined: 5. May 2011, 09:22
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Network problems between host and guest

Post by Krauser Joestar »

Anyone? :(
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Network problems between host and guest

Post by Martin »

Is there a router on your enterprise network which connects the 192.168.0 network of your guest to the 10.64 network of your host?
Krauser Joestar
Posts: 3
Joined: 5. May 2011, 09:22
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Network problems between host and guest

Post by Krauser Joestar »

Martin wrote:Is there a router on your enterprise network which connects the 192.168.0 network of your guest to the 10.64 network of your host?

Nop, my pc is connected on a switch and i think that's the reason. Let's say, could i maybe ping my guest from my host if i change its eth0:1 to something like 10.64.46.150?
Post Reply