tianon / docker-qemu

Dockerization of supported QEMU releases
https://qemu.org
133 stars 34 forks source link

No outbound network possible? #17

Closed ualex73 closed 3 years ago

ualex73 commented 3 years ago

I am using this docker image and I can see I get an IP address assigned (10.0.2.15) in the qemu environment. I can ping 10.0.2.2/10.0.2.3 (gw and dns). Also DNS lookups are working (via 10.0.2.3)

Only it is not possible to reach the outside world from the qemu environment?

tianon commented 3 years ago

This is a quirk of the user mode networking which is the only default we can apply -- see https://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29 for documentation.

I think you'll find that if you try to use HTTP, TCP, etc, they will work fine, and it's only ping/ICMP that's affected.

That being said, it appears that we can use net.ipv4.ping_group_range to get ping working too (and I've just tested and confirmed in a Windows VM I've got running), so I plan to update the suggested documentation accordingly. :+1:

ualex73 commented 3 years ago

Thanks, that fixed the issue!