All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darrin Ritter <darrinritter@optusnet.com.au>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] TUN network
Date: Wed, 28 Jul 2004 22:52:05 -0400	[thread overview]
Message-ID: <41086655.5080601@optusnet.com.au> (raw)
In-Reply-To: <200407271707.28445.menola@sbcglobal.net>

thanks I was able to get the tun0 interface configured
I looked at both scripts and the one written by Joe did the trick for me 
and now I have the tun0 interface,
however i am unable to ping from the VM to the Host and from the Host to 
the VM so there is no network connection
using the -user-net option I am able to access my swat configuration as 
well as the internet

currently i have the tun0 on the Host configures to 192.168.1.10 and the 
guest to 192.168.0.11 and the netmask on both to

255.255.255.0

just a note the win98 VM sees a realtek pci network card and not a 
NE2000 that I was expecting that the Docs talk about

any Ideas on the network will be appreciated

DarR!N



tun0      Link encap:Ethernet  HWaddr 00:FF:CC:26:27:8E
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2ff:ccff:fe26:278e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)




Joe Menola wrote:

>On Tue July 27 2004 4:25 pm, Joe Menola wrote:
>  
>
>>I setup tun0 with 2 scripts in /etc.
>>
>>/etc/q-ifup
>>
>>#!/bin/sh
>>sudo /sbin/ifconfig $1 192.168.1.1
>>sudo /etc/qemu-iptables
>>
>>/etc/qemu-iptables
>>
>>#!/bin/sh
>>/etc/rc.d/init.d/iptables stop
>>echo "1" >&/proc/sys/net/ipv4/ip_forward
>>/etc/rc.d/init.d/iptables start
>>
>>You cannot set ip_forward with iptables running, hence the stop/start
>>thing. You must also setup /etc/sudoers file, so that both scripts can run
>>as root. This is a bit complex...see
>>http://www.aplawrence.com/Basics/sudo.html for info on how to set this up.
>>    
>>
>
>I forgot to mention that 
> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
>must also be set. I have this rule permenant in iptables, which starts on 
>boot.
>Also the reason for 2 scripts is that with a single script ip_forward was 
>sometimes getting set before ifconfig created $1, and tun0 would fail to get 
>ip_forwarding. 
>Many ways to do this, most probably better then mine, but it works for me. :)
>
>-jm
>
>
>_______________________________________________
>Qemu-devel mailing list
>Qemu-devel@nongnu.org
>http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>  
>

  reply	other threads:[~2004-07-28 13:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28  3:11 [Qemu-devel] TUN network Darrin Ritter
2004-07-27 21:25 ` Joe Menola
2004-07-27 22:07   ` Joe Menola
2004-07-29  2:52     ` Darrin Ritter [this message]
2004-07-28 11:36       ` vaise
2004-07-29 15:10         ` Darrin Ritter
2004-07-29  1:58           ` Joe Menola
  -- strict thread matches above, loose matches on Subject: below --
2004-07-27 16:40 Thomas Munn
2004-05-14 20:10 [Qemu-devel] tun network vaise
     [not found] ` <20040515173848.GA22840@yuri.org.uk>
2004-05-17 19:37   ` vaise

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=41086655.5080601@optusnet.com.au \
    --to=darrinritter@optusnet.com.au \
    --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.