From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BXMzZ-0005CD-Td for qemu-devel@nongnu.org; Mon, 07 Jun 2004 12:28:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BXMzY-0005Bt-1O for qemu-devel@nongnu.org; Mon, 07 Jun 2004 12:28:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BXMzX-0005Bq-Rc for qemu-devel@nongnu.org; Mon, 07 Jun 2004 12:28:55 -0400 Received: from [206.72.67.39] (helo=claudius.sentinelchicken.org) by monty-python.gnu.org with smtp (Exim 4.34) id 1BXMya-000205-DN for qemu-devel@nongnu.org; Mon, 07 Jun 2004 12:27:56 -0400 Date: Mon, 7 Jun 2004 09:21:57 -0700 From: Tim Subject: Re: [Qemu-devel] TUN settings Message-ID: <20040607162157.GA19110@sentinelchicken.org> References: <200406071257.34308.hetz@softier.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406071257.34308.hetz@softier.com> 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 > Here's my /etc/qemu-ifup script (based on what Tim posted): > > !/bin/sh sudo /sbin/ifconfig tun0 192.168.2.200 netmask 255.255.255.0 > broadcast 192.168.2.255 > sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward' on the first line... shouldn't that be broken into two? making it look something like: #!/bin/sh sudo /sbin/ifconfig tun0 192.168.2.200 netmask 255.255.255.0 broadcast 192.168.2.255 sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward' > And yet, I cannot ping the TUN interface in the host (192.168.2.200), and I > cannot ping anywhere else. You probably know all of these things, but it doesn't hurt to check: - Your qemu-ifup script is executable by your user, yes? - /dev/net/tun exists (`MAKEDEV tun' has been run in /dev ??) - /dev/net/tun is writable by your user? - Your host OS's real ethernet card is configured to a different network than tun0, right? You aren't going to be able to route (and ping may not even work) if you set tun0 and the guest OS to an IP in the same network range that your real NIC is a part of. When QEMU is running, does ifconfig report the correct settings for tun0? pardon me if this stuff is obvious to you, tim