On 3/27/07, David Baron <[EMAIL PROTECTED]> wrote: > On Thursday 01 March 2007, ML wrote: > > On 01/03/2007 05:55, Alexey Eremenko wrote: > > > The only problem is that bridging works to outside world, but not > > > between Host and Guest. > > > > > > Can someone help me out with this ? > > > > I have set up full networking between guest and host and between the guest > > and the outside world. > > I have a linux host and winXP guest and this is how I set up networking: > > > > on the host > > > > modprobe tun > > tunctl -t tap0 -u <your_user> > > ifconfig tap0 10.0.2.2 netmask 255.255.255.0 > > iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -o eth0 -j SNAT --to > > <your.IP> chmod 666 /dev/net/tun > > > > > > then in virtualbox I use "host interface" and tap0 as interface name and in > > the guest I configure manually the network adapter (I use 10.0.2.15 netmask > > 255.255.255.0, default gateway 10.0.2.2), add your dns and you're set! > > > > It works like a charm for me: I can connect to the internet from the guest > > and I can also connect between the host and the guest using samba. > > > Trying this. I have no fixed IP so tihs can be problematic but set to current > one. > > I can ping 10.0.0.2 from host. > Attempt to access from guest does register as tap0 traffic but fails. > I have no DNS server on board. How to I add my DNS? Hosts?
Instead of -j SNET --to <your IP> you can use the following: /sbin/iptables -t nat -A POSTROUTING -o <public interface> -j MASQUERADE where <public interface> is eth0 if you use ethernet to connect to internet or ppp0 if you use dial-up or USB dsl modem. Regarding DNS, you can run DNS server on Linux host in which case you have to give the IP address of the linux host as the DNS server for windows. The other solution is to use IP address of your provider's DNS, this should be a fixed IP address all the time. _______________________________________________ vbox-users mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-users
