# Linux Kernel Module Cheat

#### 15.3.2. Guest to host networking

First Enable networking.

Then in the host, start a server:

    python -m SimpleHTTPServer 8000

And then in the guest, find the IP we need to hit with:

    ip rounte

which gives:

    default via 10.0.2.2 dev eth0
    10.0.2.0/24 dev eth0 scope link  src 10.0.2.15

so we use in the guest:

    wget 10.0.2.2:8000

Bibliography:

- https://serverfault.com/questions/769874/how-to-forward-a-port-from-guest-to-host-in-qemu-kvm/951835#951835

- https://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network/547698#547698