3 ms·
>Set up a port-forwarding rule that allows the host machine to access the VM's port 80 under "http://localhost:8080 http://localhost:8080". (You can't forward p
by aftbit 3y ago
>Set up a port-forwarding rule that allows the host machine to access the VM's port 80 under "http://localhost:8080 http://localhost:8080". (You can't forward port 80 directly, as it can only be made use of as root. I will also get back to this later.)
You could give the qemu binary the capability to bind low numbered ports as a non-root user:
setcap 'cap_net_bind_service=+ep' $(which qemu-system-i386)
Or there's probably some arcane combination of systemd options to make it work just for that service. Maybe.
- navanchauhan 3y agoFor systemd version >= 229, this does the same: [Service] AmbientCapabilities=CAP_NET_BIND_SERVICE