Block packets from other device connected to wifi

Tarun Batra tbatra18 at gmail.com
Fri Feb 16 12:39:19 EST 2018


Hi Really thanks for reply.
Let me explain u my situation
I have a device A and device B and both are connected to router R.
I have a driver code running on router R, what I want is as of now, I don't
want device A to be able to ping device B.

On 16-Feb-2018 11:05 PM, <valdis.kletnieks at vt.edu> wrote:

> On Fri, 16 Feb 2018 22:08:10 +0530, Tarun Batra said:
>
> > i have a device connected to wifi, what i want is to block packets from a
> > mac address of other device, i have to write driver for same, should i
> use
> > netfilter for same.
>
> Not sure why this is a kernel issue.
>
> iptables -A input -m mac --mac-source 00:00:ff:dead:beef -j DROP
>
> Most sane wifi routers give you a nice gui to set it up - look for a page
> that
> says 'MAC address security" or similar.  Should be able to configure it to
> only
> accept packets from MAC addresses you list, or blacklist packets from
> listed
> addresses and allow all others.
>
> If your question is actually about something else, explain in more detail
> what
> it is you're attempting to do (and include some of the "why" as well -
> "trying
> to block packets from XYZ" is a "how".  I'd estimate that 85% of the time,
> when
> we hear the "why" (for instance, "because packets from XYZ crash my ABC"),
> it
> becomes obvious that you should really be doing something else - in this
> example, find out *why* ABC crashes and fix *that* rather than blocking
> packets
> (though of course, blocking the packets as a temporary measure while you
> fix
> the *actual* problem may be a good idea)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180216/0bacec34/attachment.html>


More information about the Kernelnewbies mailing list