How to – Networking for Qemu



Step : 1 Create qemu-ifup script

cat > qemu-ifup
/sbin/ifconfig $1 promisc up
/usr/sbin/brctl addif br0 $1

chmod +x qemu-ifup
cd ..


Step : 2   Networking for Qemu


modprobe tun

/usr/sbin/brctl addbr br0
/sbin/ifconfig eth0 promisc up
/usr/sbin/brctl addif br0 eth0
/sbin/dhclient br0
/sbin/iptables -F FORWARD

Enable IP forwarding
Edit sysctl.conf and add

net.ipv4.ip_forward = 1

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.