You are not logged in.

#1 2024-03-08 15:50:17

trakno
Member
Registered: 2019-11-05
Posts: 8

qemu port redirection

Hi,
I would like to host a WEB server on a qemu virtual machine.
The documentation says that I need to create a qemu Hooks file to forward ports. In my case the ports are 80 and 443, and when I create the qemu hooks file to redirect ports 80 and 443 to the virtual machine, the latter loses all access to the web (ports 80 and 443).
Do you know of a way to identify why the virtual machine looses outbound access to these two ports, or another redirection technique?

Regards, and bravo Archlinux !


Rules changes with rolling updates !

Offline

#2 2024-03-10 05:57:49

yataro
Member
Registered: 2024-03-09
Posts: 10

Re: qemu port redirection

Have you tried https://wiki.archlinux.org/title/QEMU#Q … forwarding? For you the args should be

-nic user,hostfwd=tcp::80-:80,hostfwd=tcp::443-:443

Offline

#3 2024-03-14 15:30:02

trakno
Member
Registered: 2019-11-05
Posts: 8

Re: qemu port redirection

Sorry for this late reply,
Thanks for your time, it seems that forward ports between 1-1024 is not a good idea, so i've changed the setup.
qemu hook script is working without any issues with ports > 1024.
( On https://wiki.libvirt.org/Networking.html, i'm surprised to see the author classify this hook script as a Hack without any configuration alternative. )
Regards


Rules changes with rolling updates !

Offline

Board footer

Powered by FluxBB