All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Menola <menola@sbcglobal.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] tun interface
Date: Sat, 28 Aug 2004 00:37:50 -0500	[thread overview]
Message-ID: <200408280037.50439.menola@sbcglobal.net> (raw)
In-Reply-To: <200408281115.13256.andrej@paradise.net.nz>

On Fri August 27 2004 6:15 pm, Andrej wrote:
> On Fri, 27 Aug 2004 12:02, Joe Menola wrote:
> > My /etc/qemu-ifup
> >
> > #!/bin/sh
> > sudo /sbin/ifconfig $1 <ip address>
> >
> > script also needs to be executable.
> >
> > This is only my understanding of the tun concept, and it
> > works. :)
>
> That's quite odd ... when there was no qemu-ifup my virtual
> Slackware install had a network interface that it brought
> up ... with tun and NATing I don't seem to get eth0 anymore.
>
>
I believe Qemu defaults to user-net if no ifup is found. My guess is your tun 
device isn't setup properly.

You must setup iptables, I start iptables via init, so I add MASQ rule
 
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/etc/rc.d/init.d/iptables save

(this way I don't have to worry about nat after each boot)


And after Qemu is running, root must setup ip_forward. This cannot be done 
with iptables running. I do this via a script called by qemu-ifup>

#!/bin/sh
/etc/rc.d/init.d/iptables stop
echo "1" >&/proc/sys/net/ipv4/ip_forward
/etc/rc.d/init.d/iptables start

-jm

      reply	other threads:[~2004-08-28  5:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26 20:30 [Qemu-devel] tun interface Andrej
2004-08-26 21:20 ` Joe Menola
2004-08-26 23:37   ` Andrej
2004-08-26 23:44     ` Jim C. Brown
2004-08-26 23:52       ` Andrej
2004-08-27  0:02     ` Joe Menola
2004-08-27  6:43       ` Renzo Davoli
2004-08-27 23:15       ` Andrej
2004-08-28  5:37         ` Joe Menola [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200408280037.50439.menola@sbcglobal.net \
    --to=menola@sbcglobal.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.