From: Tomasz Chmielewski <mangoo@wpkg.org>
To: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
Cc: netfilter@vger.kernel.org
Subject: Re: ebtables and anti-spoofing rules not working 100%?
Date: Sun, 29 Aug 2010 18:46:37 +0200 [thread overview]
Message-ID: <4C7A8EED.9060203@wpkg.org> (raw)
In-Reply-To: <4C7A7CB7.9020701@plouf.fr.eu.org>
On 29.08.2010 17:28, Pascal Hambourg wrote:
>> # guest communication with the gateway
>> ebtables -A INPUT -i vmtab107i0 -j vm107
>> ebtables -A OUTPUT -o vmtab107i0 -j vm107
>
> Do you need to prevent spoofing by the host itself ?
Host is "trusted", so it doesn't need any additional measures.
Guests, on the other hand, are to be "untrusted".
>> What anti-spoofing rules I need to have to prevent some kvm guests
>> pretending to be other kvm guests (or, even pretending to be "gateways")?
>
> Just create rules called from INPUT and FORWARD which match the input
> interface (bridge port) and the MAC and IP source address.
>
> ebtables -A INPUT -i vmtab107i0 -j vm107
> ebtables -A FORWARD -i vmtab107i0 -j vm107
>
> ebtables -A vm107 -p IPv4 -s 11:22:33:44:55:66 --ip-src 1.2.3.4 \
> -j ACCEPT
> ebtables -A vm107 -p ARP -s 11:22:33:44:55:66 \
> --arp-mac-src 11:22:33:44:55:66 --arp-ip-src 1.2.3.4 -j ACCEPT
With these rules, I'm not able to communicate (i.e. ping) with other
hosts in the same subnet, except the gateway (although this was the same
with my previous rules, I think).
Also, if I do this on the "rogue" guest (with MAC, IP belonging to the
"other" guest):
ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF
ifconfig eth0 1.2.3.22
any communication to the "other" still breaks (from external hosts). So,
no improvement.
--
Tomasz Chmielewski
http://wpkg.org
next prev parent reply other threads:[~2010-08-29 16:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-29 13:59 ebtables and anti-spoofing rules not working 100%? Tomasz Chmielewski
2010-08-29 15:28 ` Pascal Hambourg
2010-08-29 16:46 ` Tomasz Chmielewski [this message]
2010-08-29 17:25 ` Jonathan Tripathy
2010-08-29 17:34 ` Tomasz Chmielewski
2010-08-29 18:23 ` Jonathan Tripathy
2010-08-29 18:36 ` Tomasz Chmielewski
2010-08-30 18:14 ` Pascal Hambourg
2010-08-30 18:38 ` Tomasz Chmielewski
2010-08-30 21:34 ` Pascal Hambourg
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=4C7A8EED.9060203@wpkg.org \
--to=mangoo@wpkg.org \
--cc=netfilter@vger.kernel.org \
--cc=pascal.mail@plouf.fr.eu.org \
/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