Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: DROP All MACs
Date: Mon, 17 Nov 2003 15:04:45 +0000	[thread overview]
Message-ID: <200311171504.hAHF4nj22179@agate.rockstone.co.uk> (raw)
In-Reply-To: <8d797268.72688d79@dialogsl.net>

On Monday 17 November 2003 2:55 pm, curlybraces@dialogsl.net wrote:

> hi all
>
> can some body tell me how to block all mac addresses in the same network
> via iptables ...............!!!!!

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -F INPUT
iptables -F FORWARD

will block all mac addresses :)

> but don't ask why ...ok

Okay, I guess the above is not the solution you were looking for, however 
without further explanation of exactly what you mean by "block all mac 
addresses in the same network", I can only suggest the following:

iptables -I FORWARD -m mac --mac-source aa:bb:cc:dd:ee:ff -j DROP

Replace FORWARD with INPUT if you want to block packets coming into the 
netfilter machine rather than those being routed through it; repeat this rule 
for each mac address you want to block.   If you really do want to block 
*all* mac addresses, then simply DROP all packets - no need to look at the 
mac address if you want to block them all.

Antony.

-- 

Nostaliga is not what it used to be.

                                                     Please reply to the list;
                                                           please don't CC me.


      reply	other threads:[~2003-11-17 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-17 14:55 DROP All MACs curlybraces
2003-11-17 15:04 ` Antony Stone [this message]

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=200311171504.hAHF4nj22179@agate.rockstone.co.uk \
    --to=antony@soft-solutions.co.uk \
    --cc=netfilter@lists.netfilter.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