Re: qemu: Enable guest access to the internet


Manuel Wagesreither
 

Hi Richard,

Am Sa, 19. Mär 2022, um 13:00, schrieb Richard Purdie:
SLIRP only allows specific ports and will not work for general internet
connectivity. It can be done without root but the downside is it isn't as
powerful. TAP would allow the guest internet access but needs to be setup in
advance (using the gen-tapdevs script) or for there to be sudo access to setup
what is needed.
I hoped I could SLIRP for general internet connectivity to work by enabling NAT on the host. If I recall correctly, I could see the pings I sent from inside the qemu guest to 10.0.2.2 show up on my host, hence I assumed there is a chance. (I checked with wireguard.) With systemd-networkd NAT seems to be quite easy to set up: [1].

[1] https://www.freedesktop.org/software/systemd/man/systemd.network.html#IPMasquerade=

Regards,
Manuel

Join yocto@lists.yoctoproject.org to automatically receive all group messages.