All of lore.kernel.org
 help / color / mirror / Atom feed
From: Piotr Kaczmarzyk <piotr@connecta.pl>
To: netfilter@vger.kernel.org
Subject: ipset - adding two MACs with same IP address
Date: Fri, 28 Dec 2012 18:45:09 +0100	[thread overview]
Message-ID: <50DDDAA5.6020901@connecta.pl> (raw)

Hi,

I'd like to create ip set, where some IP addresses have two or more 
possible MAC addresses. I.e. I want to replace following iptables entries:

iptables -A FORWARD -s 10.0.0.2 -m mac --mac-source 00:11:22:33:44:55 -j 
ACCEPT
iptables -A FORWARD -s 10.0.0.2 -m mac --mac-source 00:22:44:66:88:aa -j 
ACCEPT

with someting like:

ipset -A ACCEPTEDMAC "10.0.0.2,00:11:22:33:44:55"
ipset -A ACCEPTEDMAC "10.0.0.2,00:22:44:66:88:aa"

but after second command ipset says:

ipset v6.16.1: Element cannot be added to the set: it's already added

Is there any way to do this with ipset? Or maybe another way to speed up 
this filtering?

Best regards,

Piotr

                 reply	other threads:[~2012-12-28 17:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=50DDDAA5.6020901@connecta.pl \
    --to=piotr@connecta.pl \
    --cc=netfilter@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.