TransWikia.com

Port forwarding with KVM

Unix & Linux Asked by Ari Stehney on December 19, 2021

In building a recent project, I started using libvirt (virt-install) for quick virtualization. I have been using the default virtual network, and need to forward a specific port from each virtual machine to the host’s external ip so that I can access it from another computer on the network.

I have tried iptables, and all of the solutions I tried resulted in it being accessible from localhost, but not from and external machine. The machine is running Ubuntu Server 20.04, with a single NIC. I have also messed with UFW, and when I start a test web server on the same port directly on the host, it is accessible from another computer on the network.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP