[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] eth0 problems

From: Lonnie Cumberland
Subject: Re: [Qemu-devel] eth0 problems
Date: Sat, 28 Aug 2004 22:33:31 -0400
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

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?


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
sudo /sbin/ifconfig $1 <ip address>
sudo /etc/qemu-iptables
2- #chmod 777 /etc/qemu-ifup

3- Create file /etc/qemu-iptables

/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

4- #chmod 777 /etc/qemu-iptables

Qemu-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]