Exposing libvirt networks to the LAN?

Issues related to configuring your network
Post Reply
gunnarniels
Posts: 4
Joined: 2016/10/30 15:03:34

Exposing libvirt networks to the LAN?

Post by gunnarniels » 2017/04/09 21:49:13

Hello, hopefully someone can point me in the right direction because I'm not really sure what I need to even research to accomplish this...

I am on my laptop on a vanilla home network 192.168.1.0/24, I have a centos7 server at 192.168.1.2, and on that server, I'm running libvirt with a network 192.168.100.0/24. I'm simply looking for a way to be able to communicate with vms on the 192.168.100.0/24 network from my laptop, which knows nothing about that subnet. I added a route to my laptop with the centos server as the gateway, but I can't ping the guests on the 100 network. In my research, I've found tutorials that suggest I need to add some net/forwarding rules with ip tables on the centos server, but none of them have worked.

Could anyone point me in the right direction for this?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Exposing libvirt networks to the LAN?

Post by TrevorH » 2017/04/09 23:36:18

The usual way is to use a bridge on the host and use bridged networking instead of NAT.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Exposing libvirt networks to the LAN?

Post by hunter86_bg » 2017/04/10 13:39:45

Or if you don't want to make any changes on the network - you can use simple ssh "magic", if plain ssh is the goal.

gunnarniels
Posts: 4
Joined: 2016/10/30 15:03:34

Re: Exposing libvirt networks to the LAN?

Post by gunnarniels » 2017/04/11 01:00:32

TrevorH wrote:The usual way is to use a bridge on the host and use bridged networking instead of NAT.
Thanks Trevor. I'm not very familiar with this, do you have any recommended reading / tutorial on how to accomplish this?

Post Reply