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 192.168.1.0/24 -d !
192.168.1.0/24 -j SNAT --to-source 192.168.0.2

Bad argument `192.168.1.0/24'

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 192.168.0.2 -j DNAT
--to-destination 192.168.1.10

iptables -t nat -A POSTROUTING -i eth0 -s 192.168.1.10 -j SNAT
--to-source 192.168.0.2

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


Also, on host I do:

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

and on guest:

route add -host 192.168.1.2 dev eth0
route add default gw 192.168.0.2


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4ec160a7.d278cc0a.6f8d.ffffb983@xxxxxxxxxxxxx



Relevant Pages

  • Re: problems after rebuild of 5.5 stable
    ... The default operation in mergemaster is to do nothing, ... My next step is to start from scratch Unfortuntely, even with ipfw set to open, I am still getting no route to host when I try and ping my gateway. ... Now I can cvsup to a production 'Release' version of FreeBSD, ... To unsubscribe, send any mail to ...
    (freebsd-questions)
  • Re: how to encrypt/decrypt remote folder ?
    ... If enough people consider a problem such, it is easy to route around.. ... There's more noise about top posting, HTLM posting, bad hidden email ... a newbie shouldn't ask newbie questions, but read what a smart question ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: problems after rebuild of 5.5 stable
    ... My next step is to start from scratch Unfortuntely, even with ipfw set to open, I am still getting no route to host when I try and ping my gateway. ... I tried trying ifup sis0 but I discovered ifup is no longer around. ... To unsubscribe, send any mail to ...
    (freebsd-questions)
  • Re: [opensuse] Re: domain and email forwarding
    ... The standard edition is FREE. ... The route shows that the message comes from one ... To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
    (SuSE)
  • RE: broadcast udp packets ...
    ... I know it is kind of crude but it works in my case :-) ... Sreekanth ... >> local address that has the default route. ... To unsubscribe, ...
    (freebsd-net)