Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up a virtual network as described here. These are my steps:

ifup eth0 # uses DHCP
brctl addbr br0
ifconfig br0 up
kvm ... -device e1000,netdev=tap0 -netdev type=tap,id=tap0,sccript=/etc/qemu-ifup

where qemu-ifup does

ifconfig tap0 promisc up
brctl addif br0 tap0

And finally, inside the vm,

ifconfig eth0
route add default gw

This allows me to ping and (the host's IPs) from inside the guest, and the guest from inside the host.

However, I cannot ping a guest from inside another guest, nor any other IP outside the host (, or, for example).

How should I set this up?

share|improve this question
up vote 2 down vote accepted

There is two question:

1) Have you allowed a forwarding between br0 and eth0? You can check it via this command:

cat /proc/sys/net/ipv4/ip_forward

If you get a "0", you must correct it to "1":

echo "1" > /proc/sys/net/ipv4/ip_forward

You can allow it in the /etc/sysctl.conf permanently.

2) You have to have a NAT settings via iptables, for example somethink like:

iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.