How to – Networking for Qemu

 

 

Step : 1 Create qemu-ifup script

cat > qemu-ifup
#!/bin/sh
/sbin/ifconfig $1 0.0.0.0 promisc up
/usr/sbin/brctl addif br0 $1
^d

chmod +x qemu-ifup
cd ..

 

Step : 2   Networking for Qemu

 

modprobe tun

/usr/sbin/brctl addbr br0
/sbin/ifconfig eth0 0.0.0.0 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.

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