# KVM & Networking

## Smoothhound

Hello

I'm having trouble getting KVM & networking configured to my liking, I've done the google dance and I can't quite figure it out.

My requirements:

 * I have one guest and I would like for it to be able to connect to the local LAN & internet, this I can do  :Smile: 

 * I would also like network access from the host, this I cannot do  :Sad: 

 * In an ideal world I'd like to be able to connect to the guest from the LAN but as I will be mainly using a wireless interface on the host I gather that this is currently impossible

Has any anyone got a working config for this sort of setup?

Thanks

----------

## Hu

Yes, this setup works.  If your host network device supports bridging, you can satisfy all three points.  Some wireless cards are deficient and cannot bridge.  I am not aware of any wired cards which exhibit such a deficiency.

In any case, you should have no problems accessing the guest from the host.  Please explain what you have done so far.  Include the full command line used to start kvm, a description of how you have assigned it an address, and what, if any, iptables rules you are using on the host.  If the guest has a firewall, be sure to set it to allow the host to connect.

----------

## idella4

There is a gentoo doc that covers just that.

http://en.gentoo-wiki.com/wiki/KVM

This from it

 *Quote:*   

> 
> 
>  the bridge connects eth0 and your tuntap interfaces together, routing packets as if it were a real "old fashioned" hub
> 
> 

 

is key.  Your kernel has to be equipped.

modprobe tun.

If it's not there, back to the kernel and get it set.

See also gentoo qemu how to.

----------

