From owner-freebsd-questions@FreeBSD.ORG Thu Apr 10 01:25:20 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0852B1065678 for ; Thu, 10 Apr 2008 01:25:20 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id CFACB8FC1A for ; Thu, 10 Apr 2008 01:25:19 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so2142632waf.3 for ; Wed, 09 Apr 2008 18:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=LQSQufj/ruXMW+XwKFCLWlPUGQ9Ss2NrCi2M1At9Yco=; b=w8tGdTXsv9Cn/LKDehI/eargjnY1obZlLlSDGmBAjAe70RrCjW/8x1NqaPUPTV9RS5GWR1yUMR/+qq1M0roYYMXQivhrjwYuBb5oAzxeyZJFmbfp9sUOTQA7h1B+rxWwc1E357opjWqFM6/qFJodtVX3csNiWjcCLnLtpCBFcTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cuKEwYhMH2ongufNPj6s6rPVCoh3Sd3e1Sks6a03tTIvrMP6FNTt3sIfgxogh5/SEXZPmYQrJYtr84NfySQC7znASvhquv/9OHHmXIxNaNgU6B+fqX1c5MN5/8hEZtvjdnj0WjB/DJZItuk4r/FHugvDJrW7LpTBJGTHtREkhtE= Received: by 10.115.61.1 with SMTP id o1mr1105519wak.94.1207790719022; Wed, 09 Apr 2008 18:25:19 -0700 (PDT) Received: by 10.114.113.11 with HTTP; Wed, 9 Apr 2008 18:25:18 -0700 (PDT) Message-ID: <80f4f2b20804091825y2a37bddehd68e91f57426dc04@mail.gmail.com> Date: Thu, 10 Apr 2008 01:25:18 +0000 From: "Jim Stapleton" To: "Andrew Cid" In-Reply-To: <20080409091859.GA14939@farnborough.darq.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <80f4f2b20804081710k5af28466k17f3d38cdd6e344a@mail.gmail.com> <20080409091859.GA14939@farnborough.darq.net> Cc: freebsd-questions@freebsd.org Subject: Re: QEMU networking quirkiness on 7.0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2008 01:25:20 -0000 On Wed, Apr 9, 2008 at 9:18 AM, Andrew Cid wrote: > Hi Jim, > > > > The QEmu VM can access the web (I'm typing this out now in WindowsXP > > running safely in it's cage, for example). But it cannot VPN into work > > (timeout) or ping anything. I suspect it has to do with the way that > > QEmu is given network access. Is there any way to set up QEmu to > > access the network through an aliased IP address, and hence look like > > any other machine on my network, rather than to hide behind my BSD > > box? Is there another route I should take?+ > > > I connect my qemu boxes via the tap interface and then bridge it to the > external interface so it works like just another box on the LAN. It's > quite easy to setup and works pretty well, checkout: > http://people.freebsd.org/~maho/qemu/qemu.html > I just C&Ped a huge section and tacked it on to the end of this mail. It says to do this within the emulator, but the emulator is supposedly running win2k. I take it this is done on the host system? Thanks, -Jim Stapleton Networking Default, network is configured inside of the emulator; not visible from outside. This is not absolutely confotable! There are pros and cons: you must be the root and your qemu virtual machine is visible from outside. Assume you know your network interface name. In my case this is fxp0. you can check this by: % dmesg | grep Ethernet First, as root, # kldload bridge.ko # sysctl net.link.ether.bridge_cfg=fxp0,tap0 net.link.ether.bridge_cfg: -> fxp0,tap0 # sysctl net.link.ether.bridge.enable=1 net.link.ether.bridge.enable: 0 -> 1 create /etc/qemu-ifup script as #!/bin/sh ifconfig ${1} 0.0.0.0 and make this script runnable. # chmod 755 /etc/qemu-ifup To do this at every boot time, write /etc/sysctl.conf net.link.ether.bridge_cfg=fxp0,tap0 net.link.ether.bridge.enable=1