Re: KVM networking.

Thank You for Your time and answer, Arno:

I think this setup might need additional configuration on the outside,
because you need to add the same subnet route on your Internet
modem/router. I don't think qemu gives you NAT for free...

I've got such a problem w/ NATing:

/sbin/iptables -t nat -A POSTROUTING -s -d ! -j SNAT --to-source

Bad argument `'

Do You have any idea why iptables does not accept the ip nor the ip net?

Then I went this way for NAT-ing but w/ no luck:

iptables -t nat -A PREROUTING -i eth0 -s -j DNAT

iptables -t nat -A POSTROUTING -i eth0 -s -j SNAT

iptables -A FORWARD -i eth0 -o tap0 -d -j ACCEPT

Also, on host I do:

sysctl -w net.ipv4.ip_forward=1
route add -host dev tap0

and on guest:

route add -host dev eth0
route add default gw

To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx