From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BpoGj-0002iJ-K0 for qemu-devel@nongnu.org; Wed, 28 Jul 2004 09:14:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BpoGh-0002hu-ML for qemu-devel@nongnu.org; Wed, 28 Jul 2004 09:14:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BpoGh-0002hc-Ho for qemu-devel@nongnu.org; Wed, 28 Jul 2004 09:14:51 -0400 Received: from [211.29.132.32] (helo=mail002.syd.optusnet.com.au) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BpoDP-00063H-3Q for qemu-devel@nongnu.org; Wed, 28 Jul 2004 09:11:27 -0400 Received: from [192.168.0.254] (fliax5-027.dialup.optusnet.com.au [211.29.13.27]) (authenticated) by mail002.syd.optusnet.com.au (8.11.6p2/8.11.6) with ESMTP id i6SDBKG30073 for ; Wed, 28 Jul 2004 23:11:22 +1000 Message-ID: <41086655.5080601@optusnet.com.au> Date: Wed, 28 Jul 2004 22:52:05 -0400 From: Darrin Ritter MIME-Version: 1.0 Subject: Re: [Qemu-devel] TUN network References: <4107194E.3080201@optusnet.com.au> <200407271625.01576.menola@sbcglobal.net> <200407271707.28445.menola@sbcglobal.net> In-Reply-To: <200407271707.28445.menola@sbcglobal.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org thanks I was able to get the tun0 interface configured I looked at both scripts and the one written by Joe did the trick for me and now I have the tun0 interface, however i am unable to ping from the VM to the Host and from the Host to the VM so there is no network connection using the -user-net option I am able to access my swat configuration as well as the internet currently i have the tun0 on the Host configures to 192.168.1.10 and the guest to 192.168.0.11 and the netmask on both to 255.255.255.0 just a note the win98 VM sees a realtek pci network card and not a NE2000 that I was expecting that the Docs talk about any Ideas on the network will be appreciated DarR!N tun0 Link encap:Ethernet HWaddr 00:FF:CC:26:27:8E inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::2ff:ccff:fe26:278e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Joe Menola wrote: >On Tue July 27 2004 4:25 pm, Joe Menola wrote: > > >>I setup tun0 with 2 scripts in /etc. >> >>/etc/q-ifup >> >>#!/bin/sh >>sudo /sbin/ifconfig $1 192.168.1.1 >>sudo /etc/qemu-iptables >> >>/etc/qemu-iptables >> >>#!/bin/sh >>/etc/rc.d/init.d/iptables stop >>echo "1" >&/proc/sys/net/ipv4/ip_forward >>/etc/rc.d/init.d/iptables start >> >>You cannot set ip_forward with iptables running, hence the stop/start >>thing. You must also setup /etc/sudoers file, so that both scripts can run >>as root. This is a bit complex...see >>http://www.aplawrence.com/Basics/sudo.html for info on how to set this up. >> >> > >I forgot to mention that > iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE >must also be set. I have this rule permenant in iptables, which starts on >boot. >Also the reason for 2 scripts is that with a single script ip_forward was >sometimes getting set before ifconfig created $1, and tun0 would fail to get >ip_forwarding. >Many ways to do this, most probably better then mine, but it works for me. :) > >-jm > > >_______________________________________________ >Qemu-devel mailing list >Qemu-devel@nongnu.org >http://lists.nongnu.org/mailman/listinfo/qemu-devel > > >