forward both TCP and UDP ports

This commit is contained in:
ghe0 2025-03-09 04:26:23 +02:00
parent 3cca48680b
commit 4689ab82c7
Signed by: ghe0
GPG Key ID: 451028EE56A0FBB4

@ -87,7 +87,7 @@ while read -r interface; do
for port_pair in $NAT_PORT_FW; do
host_port="$( echo $port_pair | cut -d ':' -f1 )"
guest_port="$( echo $port_pair | cut -d ':' -f2 )"
ports+=",hostfwd=tcp::${host_port}-:${guest_port}"
ports+=",hostfwd=tcp::${host_port}-:${guest_port},hostfwd=udp::${host_port}-:${guest_port}"
done
qemu_device_params+=" -netdev user,id=natnic${ports}"
qemu_device_params+=" -device virtio-net-pci,netdev=natnic,romfile="