QEMU networking notes
Sep. 1st, 2013 05:00 pm(The canonical location of this blog post is now QEMU networking notes on my web site.)
The default network settings allow the guest to connect to the Internet (via TCP and UDP but not e.g. ICMP/ping), and to the host at 10.0.2.2.
If, for example, you're running a web server locally on the host, the guest can `curl http://10.0.2.2/`. A local firewall won't necessarily prevent this because QEMU makes the guest's network request from your computer and your user account. If your web server has rewrite rules based on the HTTP Host header, try changing Host using `curl -H "Host: localhost" http://10.0.2.2/` (use -v/--verbose to make curl show request and response headers).
( Read more... )
The default network settings allow the guest to connect to the Internet (via TCP and UDP but not e.g. ICMP/ping), and to the host at 10.0.2.2.
If, for example, you're running a web server locally on the host, the guest can `curl http://10.0.2.2/`. A local firewall won't necessarily prevent this because QEMU makes the guest's network request from your computer and your user account. If your web server has rewrite rules based on the HTTP Host header, try changing Host using `curl -H "Host: localhost" http://10.0.2.2/` (use -v/--verbose to make curl show request and response headers).
( Read more... )