qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Joe Menola <menola@sbcglobal.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu and TUN/TAP; a conceptual overview and instructions for use.
Date: Mon, 9 Aug 2004 08:25:55 -0500	[thread overview]
Message-ID: <200408090825.55269.menola@sbcglobal.net> (raw)
In-Reply-To: <1092056497.11553.30.camel@unixadmindazfc2.chh.co.nz>

On Mon August 9 2004 8:01 am, Darryl Dixon wrote:

> #!/bin/bash
> iptables --flush          #Clear out all previous rules
> ('/etc/init.d/iptables stop' may also work)
> echo 1 >/proc/sys/net/ipv4/ip_forward     #Enable IP forwarding for the
> host OS
> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE   #Enable
> masquerading on your real NIC so tun0 can get in and out
> ifconfig $1 10.0.0.1   #Bring up tun0 on a different subnet from the
> host
> --------8<--------snip

This should work as far as tun0 goes, but this kills all preset iptables 
rules. Which is fine if you're not using iptables. To preserve other iptables 
I've added Masquerade to my saved rules via:

From terminal as root
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 
#/etc/rc.d/init.d/iptables save

And eliminated the  "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE " 
command from my qemu-ifup script. Of course iptables must be set to start on 
boot.

Hope this helps more then it confuses.

-jm

      reply	other threads:[~2004-08-09 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 13:01 [Qemu-devel] qemu and TUN/TAP; a conceptual overview and instructions for use Darryl Dixon
2004-08-09 13:25 ` 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=200408090825.55269.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).