Am Tue, 16 Sep 2008 20:49:18 -0300 schrieb Norberto Bensa <[EMAIL PROTECTED]>:
> Quoting Marc Joliet <[EMAIL PROTECTED]>: > > >> What I need is the bidirectional communication between host and > >> guest. > > > > Sorry, but I can't help you there, though I'm going to sit down and > > set that up myself when I have time (this year, I hope ;) ). > > I know! I know!! :-) Well, turns out your email got me going ;-) . Right now I got it working without using a bridge. I can ping my Windows XP VM and it can ping everything else on my side, however, nmap won't work. I wonder why? Does the Windows firewall block it off? Otherwise, everything works to my liking. My /etc/conf.d/net: > # My standard configuration > > modules=( "iproute2" "ifplugd" ) > > # Only use dhcp with eth0 > # (Note that only dhclient allows you to specify additional domain name > servers > # (i.e. localhost) apart from the ones provided by the dhcp server.) > modules_eth0=( "dhcpcd" ) > modules_eth1=( "!plug" ) > modules_vbox0=( "!plug" ) > > dhcp_eth0="nodns nonis" > dhcpcd_eth0="-t 10" > > # Configure eth0 with dhcp, configure eth1 with a static ip > # eth0 has a static IPv6 Address so that it can be used as a router. > config_eth0=( > "dhcp" > "2001:470:d138:1:218:f3ff:fe97:1772/64" > ) > routes_eth0=( "default via 2001:470:d138:1::1" ) > config_eth1=( > "172.16.0.1 broadcast 172.16.0.255 netmask 255.255.255.0" > "fe80::20e:2eff:feb0:8cce/64" # link, needed or it will not be set > "2001:470:d138:d909::1/64" # global > ) > > tuntap_vbox0="tap" > tunctl_vbox0=( "-u marcec" ) > config_vbox0=( "172.16.1.1 broadcast 172.16.1.255 netmask 255.255.255.0" ) > > # Manually set the dns server to first look up on localhost > dns_servers_eth0="127.0.0.1 ::1" [...] > After all this, create a small bash script in /usr/bin. I called > mine addif.sh: > > #!/bin/bash > > IF="${1}" > ACTION="${2}" > BRIDGE=br0 > > case "$ACTION" in > up) > sudo VBoxAddIF "${IF}" "${LOGNAME}" "${BRIDGE}" >/dev/null > 2>&1 ;; > down) > sudo VBoxDeleteIF "${IF}" >/dev/null 2>&1 > ;; > esac > > echo $IF I would think such a script belongs in /usr/local/bin? > Add this to /etc/sudores: > > %vboxusers ALL=(ALL) > NOPASSWD: /usr/bin/VBoxAddIF, /usr/bin/VBoxDeleteIF > > > Now. Open VirtualBox and configure network like this: > > Attached to: Host Interface > > Setup application: addif.sh vbox0 up > > terminate application: addif.sh vbox0 down > > > Note that "vbox0" is any name you like. I named mine "xp" or "nt4" > or "centos" depending on the guest. > > The interface is create and destroyed on demand. I would do that (create a bridge without any IFs attached and then have them added dynamically), except the VBoxAddIF script in virtualbox-ose-2.0.2 craps out on a missing file (/var/run/VirtualBox/vboxnet). Google didn't yield anything useful. > [EMAIL PROTECTED] ~ % sudo VBoxAddIF vbox0 marcec br0 > VirtualBox host networking interface creation utility, version _VERSION_ > (C) 2005-2007 Sun Microsystems, Inc. > All rights reserved. > > Creating the permanent host networking interface "vbox0" for user marcec. > > Failed to add the interface "vbox0" to the bridge "br0". > Make sure that the bridge exists and that you currently have sufficient > permissions to do this. > /usr/bin/VBoxAddIF: line 237: /var/run/VirtualBox/vboxnet: Datei oder > Verzeichnis nicht gefunden When looking at the relevent line (237), apparently it's because the directory doesn't exist so it can't create the file. What does it look like on your system? Shouldn't the ebuild have created that directory? > Regards, > Norberto Regards, -- Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup
signature.asc
Description: PGP signature