From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J0ZVB-00033I-7v for qemu-devel@nongnu.org; Fri, 07 Dec 2007 04:28:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J0ZV8-0002yr-2G for qemu-devel@nongnu.org; Fri, 07 Dec 2007 04:28:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0ZV7-0002yD-CC for qemu-devel@nongnu.org; Fri, 07 Dec 2007 04:28:05 -0500 Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J0ZV6-0006Od-6A for qemu-devel@nongnu.org; Fri, 07 Dec 2007 04:28:05 -0500 Received: from localhost (localhost [127.0.0.1]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 0C4CE19D9F4 for ; Fri, 7 Dec 2007 10:28:01 +0100 (CET) Received: from ecfrec.frec.bull.fr ([127.0.0.1]) by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01274-04 for ; Fri, 7 Dec 2007 10:27:57 +0100 (CET) Received: from ecn002.frec.bull.fr (ecn002.frec.bull.fr [129.183.4.6]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 0A04B19D9EA for ; Fri, 7 Dec 2007 10:27:57 +0100 (CET) Subject: Re: [Qemu-devel] Re: multiple virtual network with qemu From: Laurent Vivier In-Reply-To: <9469c3170712070114m4bdd788bj3724a5a6054a9f9f@mail.gmail.com> References: <9469c3170711290138q4a22a9c1n3a318cb17566579d@mail.gmail.com> <9469c3170712070114m4bdd788bj3724a5a6054a9f9f@mail.gmail.com> Date: Fri, 07 Dec 2007 10:27:51 +0100 Message-Id: <1197019671.4397.14.camel@frecb07144> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-FDwtShnrmjgxkjrTRoOL" 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 --=-FDwtShnrmjgxkjrTRoOL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I don't know if it is what you want, but I'm using this: iptable-restore < my_iptable where my_iptable is: *filter :INPUT ACCEPT [6242:8433725] :FORWARD ACCEPT [8802:8139455] :OUTPUT ACCEPT [4070:537046] COMMIT *nat :PREROUTING ACCEPT [54:3534] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [1:60] -A POSTROUTING -o eth0 -j MASQUERADE=20 COMMIT and /etc/qemu-ifup is: #!/bin/sh echo "Configuring $1" sudo /usr/sbin/tunctl -t $1 sudo /sbin/ip link set $1 up sudo /sbin/ifconfig $1 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0 And I configure the guest with IP 192.168.1.2 and gateway 192.168.1.1. Laurent Le vendredi 07 d=C3=A9cembre 2007 =C3=A0 10:14 +0100, nik600 a =C3=A9crit : > any idea? >=20 > On Nov 29, 2007 10:38 AM, nik600 wrote: > > Hi > > > > i'm trying to set up some virtual network with qemu but i'm > > experiencing some problems: > > > > starting the hosted system with dhcp it gets the ip 10.0.2.15 and gw > > 10.0.2.2, if i activate the forwarding ip on the hosting system all > > works fine. > > > > But i'd like to do something like that: > > > > > > - gw (192.168.1.1) > > | -> hosting machine (192.168.1.2) > > | -> virtual ip (192.168.1.3) -> NAT -> emulated system 1 > > (10.0.2.15) > > | -> virtual ip (192.168.1.4) -> NAT -> emulated system 2 > > (10.0.2.16) > > > > > > Or if it possible > > > > > > - gw (192.168.1.1) > > | -> hosting machine (192.168.1.2) > > | -> virtual ip (192.168.1.3) -> emulated system 1 (192.168= .1.3) > > | -> virtual ip (192.168.1.4) -> emulated system 2 (192.168= .1.4) > > > > > > Can i do that? > > > > Thanks > > -- > > /*************/ > > nik600 > > https://sourceforge.net/projects/ccmanager > > https://sourceforge.net/projects/reportmaker > > https://sourceforge.net/projects/nikstresser > > >=20 >=20 >=20 --=20 ------------- Laurent.Vivier@bull.net -------------- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke --=-FDwtShnrmjgxkjrTRoOL Content-Type: application/pgp-signature; name=signature.asc Content-Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHWRIX9Kffa9pFVzwRArcJAJ4litjbUgdzhDvCx9Pe43B6izDACACfevmo nXdbW5ZSbWcsBLG+qK4xqEA= =9VWk -----END PGP SIGNATURE----- --=-FDwtShnrmjgxkjrTRoOL--