public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: kvm@vger.kernel.org
Cc: Chris Lalancette <clalance@redhat.com>,
	Mike Snitzer <snitzer@gmail.com>,
	kvm@vger.kernel.org
Subject: Re: Simple way of putting a VM on a LAN
Date: Fri, 25 Jul 2008 12:44:11 -0400	[thread overview]
Message-ID: <488A02DB.8020204@tmr.com> (raw)
In-Reply-To: <90eb1dc70807240722r371205fep9567014aa45158a9@mail.gmail.com>

Javier Guerra wrote:
> On Wed, Jul 23, 2008 at 11:15 PM, Bill Davidsen <davidsen@tmr.com> wrote:
>> Your easy way seems to mean using Debian, other distributions don't have
>> some of the scripts, or they are in different places or do different things.
>> Other thoughts below.
> 
> yep, on Gentoo and SuSE i didn't find the included scripts flexible
> enough, so i did the same 'by hand'.  that was a few years ago, it
> might be better now; but it's not hard to do anyway.
> 
> 
>> Not being a trusting person I find that a bridge is an ineffective firewall,
> 
> a bridge isn't a firewall.  it's the software equivalent of plugging
> both your host and guest to an ethernet switch.  in most ways, your
> host 'steps out of the way'.

Maybe I didn't have my tongue far enough in my cheek... I do know what a 
bridge is, etc, I was referring to the desirability of using iptables 
for the forwarding. I must have looked at ebtables at one time, the 
package is loaded, but I don't remember having any instant "this is 
great" moments with it, so I'll have to reread the docs if I need more 
than the bridge.
> 
>> but with a bit of trickery that could live on the VM, to the extent it's
>> needed. Now the "sets up its own IP" is a mystery, since there's no place I
>> have told it what the IP of the machine it replaces might be. I did take the
> 
> as said before, it's as if your VM is directly plugged to the LAN.
> you just configure its network 'from inside'.  the host doesn't care
> what IP numbers it uses.  in fact, it could be using totally different
> protocols, just as long as they go over ethernet.

But when the host is really on the network, it uses DHCP to set the IP, 
while in a VM it never sends any DHCP packets, the setting of the IP 
times out, and I wind up with no IP until I set it. I have checked with 
tcpdump, the DHCP requests for IP appear on the bridge, but not on the 
eth0 NIC, and so are never seen by the DHCP server.

Do you see this problem, or have any information about it? Obviously 
suggestions on fixing this are needed, since the dhcp server is a 
candidate for virtualization in the future.
> 
>> hand does result in a working configuration, however, so other than the lack
>> of control from using iptables to forward packets, it works well.
> 
> you can use iptables.  maybe you have to setup ebtables, but in the
> end, just put rules in the FORWARD chains.  google for 'transparent
> firewall', or 'bridge iptables'
> 
>> of manual setup, it's faster than setting up iptables, and acceptably secure
>> as long as the kvm host is at least as secure as the original.
> 
> just do with your VM as you do with a 'real' box.  after that, you can
> use the fact that every packet to the VM has to pass through your eth0
> device; even if they don't appear on your INPUT chains.
> 


-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot


  reply	other threads:[~2008-07-25 16:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27  1:54 Simple way of putting a VM on a LAN Bill Davidsen
2008-06-27  4:46 ` Mike Snitzer
2008-06-27  7:04   ` Chris Lalancette
2008-07-09 16:28     ` Bill Davidsen
2008-07-09 17:23       ` Javier Guerra
2008-07-24  4:15         ` Bill Davidsen
2008-07-24 14:22           ` Javier Guerra
2008-07-25 16:44             ` Bill Davidsen [this message]
2008-07-25 22:31               ` Stuart Jansen
2008-07-26 17:26                 ` Bill Davidsen
2008-06-27 22:44 ` Freddie Cash

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=488A02DB.8020204@tmr.com \
    --to=davidsen@tmr.com \
    --cc=clalance@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=snitzer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox