-2

I'm trying to establish a connection to my Guest without making it available for anyone else than my Host.

When using VMWare Guests are automatically available under their NAT IPs (at least when using Windows as a host), which makes accessing servers running on the guest.

How would I achieve something like this when using KVM?

I already tried using bridges, but that led me nowhere

I'm using Manjaro (mostly Arch under the hood)

1 Answers1

0

You don't mention what you're using to launch KVM, but since you've tagged this with 'libvirt' I'll assume you're running with libvirt.

Libvirt provides a 'Virtual network' capability which can provide simple NAT based IP connectivity to guests. This uses a bridge device underneath, but that bridge device is not connected to any physical NIC, and uses iptables rules to setup NAT routing to allow outbound only connectivity. On most distros this is visible via 'virsh net-list' as a network named 'default'. If you connect your guest to that you'll get NAT eg in the guest XML use

  <interface type="network">
     <source network="default"/>
  </interface>
DanielB
  • 2,461
  • 1
  • 10
  • 13