Restrict usermode network

This commit is contained in:
Kroese 2023-05-03 08:17:12 +02:00 committed by GitHub
parent e8c4a6412c
commit 1bfba06961

View File

@ -255,7 +255,7 @@ fi
NET_OPTS="${NET_OPTS} -device virtio-net-pci,romfile=,netdev=hostnet0,mac=${VM_NET_MAC},id=net0"
if [ "$DHCP" = "Y" ]; then
NET_OPTS="${NET_OPTS} -netdev user,id=hostnet1,hostfwd=tcp::5555-:5000"
NET_OPTS="${NET_OPTS} -netdev user,id=hostnet1,restrict=y,hostfwd=tcp::5555-:5000"
NET_OPTS="${NET_OPTS} -device virtio-net-pci,romfile=,netdev=hostnet1,id=net1"
fi