networking

Get the internet working

The guest starts without a live link until you bring the network up. Here is how to do it, and what to check when it will not connect.

How it works: the machine has a virtual network card. Its traffic is tunneled out of your browser over a WebSocket relay, which forwards it to the internet. If the relay is offline, the guest gets no connection even when everything inside it is configured correctly.

The one click way

Boot a machine, wait until you reach a shell or desktop, then press Run DHCP in the toolbar at the bottom of the screen. That loads the network driver, brings the interface up, and requests an address. Most images that include a driver come online within a few seconds.

Do it by hand

If you prefer a terminal, or the button did not take, run these inside the guest:

modprobe ne2k-pci
ip link set eth0 up
udhcpc -i eth0

On a system without udhcpc, use whichever client is present:

dhclient eth0
dhcpcd eth0

Check the connection

Confirm there is a route to the internet:

ping -c 3 1.1.1.1

Then confirm name resolution works:

ping -c 3 example.com

If the address ping works but the name does not, set a resolver and try again:

echo nameserver 1.1.1.1 > /etc/resolv.conf

When it will not connect

The interface is not called eth0

List what the kernel actually created and use that name in place of eth0:

ip link

Common alternatives are ens3, enp0s3, and enp0s4.

There is no network card at all

The card here is an NE2000 compatible device, so the guest kernel needs the ne2k-pci driver. Small and live distributions that work well in the browser include Alpine, Tiny Core, and Buildroot based images. A heavily stripped kernel may simply not have the driver built in.

The address ping fails too

If even 1.1.1.1 is unreachable, the relay that carries the traffic may be down or busy. That part is outside the guest. Wait and try again, or reboot the machine and request DHCP once more.

Expect higher latency than a normal connection. Everything is tunneled through a relay over a WebSocket, so interactive sessions feel slower than a native link.