From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BOSZD-0001Wk-4t for qemu-devel@nongnu.org; Thu, 13 May 2004 22:36:55 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BOSBu-0004CV-DM for qemu-devel@nongnu.org; Thu, 13 May 2004 22:13:26 -0400 Received: from [206.46.170.107] (helo=out007.verizon.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BORan-00067j-9h for qemu-devel@nongnu.org; Thu, 13 May 2004 21:34:29 -0400 Received: from murga.org ([162.83.142.51]) by out007.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040514013422.IKDR28276.out007.verizon.net@murga.org> for ; Thu, 13 May 2004 20:34:22 -0500 Message-ID: <40A42226.7050507@murga.org> Date: Thu, 13 May 2004 21:34:30 -0400 From: John Murga MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Win98 tun networking - This is what works for me 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 Hey I just set up Win98 under QEmu and haven't had any problems with the networking, but as I see some people here seem to be having trouble I thought I'd post what worked for me. First of all I am using Debian and a the latest 0.5.5 QEmu binaries ... In addition I have been doing most of this on a laptop that I am often connecting to different networks (via DHCP and otherwise), to counter this I installed the "dnsmasq" Debian package so that my Host can provide my Win98 instance with DNS regardless of what network config I am using (as long as the Host works). I use the script at the end of this mail to set up the network and get the Host to route all the requests from the Win98 box to the outside world. Just so I could be sure what was happening I configured the Win98 instance with a fixed IP, Gateway and DNS server as follows : IP : 192.168.2.2 DNS : 192.168.2.1 Gateway : 192.168.2.1 (Don't forget, DNS is being forwarded by "dnsmasq" on the Host) I then run QEmu as root with "qemu -hda c.img -m 256 -n net-setup.sh -b c" I've had no problems running Lotus Notes under a Nortel VPN connecting to my work from my Win98SE instance running inside QEmu on my laptop at home... The windows "ping" binary seems a bit flaky, but Exodus, putty, IE and Explorer (connecting to network drives) work like a dream too, so I am pretty impressed :-) Now I just need a decent video driver for this :-) Anyway, the contents of the "net-setup.sh" script : ------ CUT HERE ------ #!/bin/bash /sbin/ifconfig $1 192.168.2.1 /sbin/iptables -D POSTROUTING -t nat -s 192.168.2.0/24 -d ! 192.168.2.0/24 -j MA SQUERADE >& /dev/null /sbin/iptables -t nat -s 192.168.2.0/24 -d ! 192.168.2.0/24 -A POSTROUTING -j MA SQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward ------ CUT HERE ------