Date: Sun, 7 Feb 2010 11:29:38 +0100 From: "marco\.borsatino\@poste\.it" <marco.borsatino@poste.it> To: freebsd-virtualization@freebsd.org Subject: experimental virtual network with VirtualBox Message-ID: <KXGVTE$F0BCEB6863E51DE04E267F8E4007754D@poste.it>
next in thread | raw e-mail | index | archive | help
Hi. Sorry for my bad english.=0AI'm experimenting with a WinXP host and a= virtual network using VirtualBox 3.1.2.56127; I'v created 3 virtual Free= BSD 8.0 PC.=0AThe REAL PC is connected to the internet with an ADSL route= r; real router has a static IP 192.168.0.1; real PC NIC address is 192.16= 8.0.2.=0AThe first virtual PC works as a gateway between two nets with th= is configuration:=0A- 1 NIC in NAT - DHCP - assigned addres 10.0.2.15 (th= e standard IP automatically assigned by VirtualBox 3.1.2)=0A- 1 NIC in In= ternal Network - IP 172.16.1.1/24=0A- 1 NIC in Internal Network - IP 172.= 16.2.1/24=0AThis configuration lets me go on the internet and gives me ac= cess to the clients on the 2 nets.=0ABoth virtual clients ping the others= virtual PCs and both clients can access FTP area of the others virtual P= Cs.=0AFrom the virtual gateway I can access the real host webServer (whic= h is not important).=0AThis is (part) of the gateway's /etc/rc.conf:=0A=0A= hostname=3D"fbsdgw.marbosoft.org"=0A#this is my real ADSL router=0Adefaul= trouter=3D"192.168.0.1" =0Aifconfig_em0=3D"DHCP"=0Aifconfig_em1=3D"i= net 172.16.1.1netmask 255.255.255.0"=0Aifconfig_em2=3D"inet 172.16.2.1net= mask 255.255.255.0"=0Agateway_enable=3D"YES"=0A=0AThis is first "client"'= s rc.conf:=0A=0Ahostname=3D"fbsdnw11.marbosoft.org"=0Aifconfig_em0=3D"ine= t 172.16.1.2netmask 255.255.255.0"=0Adefaultrouter=3D"fbsdgw"=0A=0AMy bas= ic idea is to create a virtual network which uses real PC ad it's ADSL ro= uter (I'm working at home) only to allow my virtual gateway to access the= internet (which is possible).=0A=0AI'm not interested in comumunicating = with real PC. I'd like to simulate a Small Office situation with a gatewa= y, which should be the only one with an internet access (later I will, ma= ybe, configure a firewall, a DNS server, a DHCP server, a NFS server, a S= amba server ... and so on); the client virtual PCs should go on the inter= net through the gateway.=0A=0AThe problem is that virtual gateway accesse= s the internet, but le virtual client don't.=0A=0AThis is the output for = netstat -r from virtual gateway=0A=0ARouting tables=0AInternet:=0ADestina= tion Gateway Flags Refs Use Netif Expire=0Adef= ault 10.0.2.2 UGS 1 61 em0=0A10.0.2= .0 link#1 U 0 0 em0=0A10.0.2.15= link#1 UHS 0 0 lo0=0Alocalhost = link#4 UH 0 20 lo0=0A172.16.1.0 = link#2 U 0 0 em1=0Afbsdgw = link#2 UHS 0 0 lo0=0A172.16.2.0 li= nk#3 U 0 0 em2=0A172.16.2.1 link#= 3 UHS 0 0 lo0=0A=0AI think that 10.0.2.2 i= s the address of VirtualBox DHCP.=0A=0AI've tried to configure em0 as a N= IC with a bridge, but I've failed (probably for a fault of kowledge aboud= bridges).=0A=0AThank you for any help.=0A=0AMarco=0A=0A=0A=0A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?KXGVTE$F0BCEB6863E51DE04E267F8E4007754D>