From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C1GRk-0001td-6I for qemu-devel@nongnu.org; Sat, 28 Aug 2004 23:33:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C1GRi-0001tR-Hw for qemu-devel@nongnu.org; Sat, 28 Aug 2004 23:33:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C1GRi-0001tO-FC for qemu-devel@nongnu.org; Sat, 28 Aug 2004 23:33:34 -0400 Received: from [64.62.140.30] (helo=bottomlinewebhosting.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C1GMh-0007l6-Me for qemu-devel@nongnu.org; Sat, 28 Aug 2004 23:28:23 -0400 Message-ID: <4131407B.3090209@neenet.com> Date: Sat, 28 Aug 2004 22:33:31 -0400 From: Lonnie Cumberland MIME-Version: 1.0 Subject: Re: [Qemu-devel] eth0 problems References: <4130FF10.4040502@neenet.com> <20040829010306.GA15763@jbrown.mylinuxbox.org> <41312995.4080900@neenet.com> <200408282153.02612.menola@sbcglobal.net> In-Reply-To: <200408282153.02612.menola@sbcglobal.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Is there a way for me to tell if the TUN module has been compiled into this kernel? I looked at the src for the kernel via the "make menuconfig" and it showed the TUN/TAP device as a Module. Also the module exists in the /lib/modules directory. how can I load the tun module? Thanks, Lonnie Joe Menola wrote: >On Sat August 28 2004 7:55 pm, Lonnie Cumberland wrote: > > >>I just looked at the kernel sources for my 2.6.3-7mdk kernel and >>TUN/TAP has already been compiled in as a module. >> >>Although there is no /dev/net/tun0 listed or /dev/tun0 as well >> >> > >/dev/net/tun0 wont exist until module "tun" is loaded. > >If you wish to setup a tun device, I've created a small and raw howto for my >own use on what works for me. Should give you a decent start... > > > >First off, kernel needs tun networking support compiled in and module loaded. > >"eth0" =host device connected to lan >"/etc/rc.d/init.d" = path to init scripts >adjust as needed > > Setup Masquerade > >Run in terminal as root: > # iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE > #/etc/rc.d/init.d/iptables save > > Sanity check > #/etc/rc.d/init.d/iptables start > #/etc/rc.d/init.d/iptables status > >Rule "Chain POSTROUTING (policy ACCEPT)" > should contain: > "MASQUERADE all -- anywhere anywhere" > > Create Ifup scripts > >1- Create file: /etc/qemu-ifup > >#!/bin/sh >sudo /sbin/ifconfig $1 >sudo /etc/qemu-iptables >#end > >2- #chmod 777 /etc/qemu-ifup > >3- Create file /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 >#/usr/sbin/dhcpd -q tun0 >#end > >4- #chmod 777 /etc/qemu-iptables ><<<<<<<<<< > > > >_______________________________________________ >Qemu-devel mailing list >Qemu-devel@nongnu.org >http://lists.nongnu.org/mailman/listinfo/qemu-devel > > > >