<div dir="auto">Hi Really thanks for reply.<div dir="auto">Let me explain u my situation</div><div dir="auto">I have a device A and device B and both are connected to router R.</div><div dir="auto">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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16-Feb-2018 11:05 PM,  <<a href="mailto:valdis.kletnieks@vt.edu">valdis.kletnieks@vt.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 16 Feb 2018 22:08:10 +0530, Tarun Batra said:<br>
<br>
> i have a device connected to wifi, what i want is to block packets from a<br>
> mac address of other device, i have to write driver for same, should i use<br>
> netfilter for same.<br>
<br>
Not sure why this is a kernel issue.<br>
<br>
iptables -A input -m mac --mac-source 00:00:ff:dead:beef -j DROP<br>
<br>
Most sane wifi routers give you a nice gui to set it up - look for a page that<br>
says 'MAC address security" or similar.  Should be able to configure it to only<br>
accept packets from MAC addresses you list, or blacklist packets from listed<br>
addresses and allow all others.<br>
<br>
If your question is actually about something else, explain in more detail what<br>
it is you're attempting to do (and include some of the "why" as well - "trying<br>
to block packets from XYZ" is a "how".  I'd estimate that 85% of the time, when<br>
we hear the "why" (for instance, "because packets from XYZ crash my ABC"), it<br>
becomes obvious that you should really be doing something else - in this<br>
example, find out *why* ABC crashes and fix *that* rather than blocking packets<br>
(though of course, blocking the packets as a temporary measure while you fix<br>
the *actual* problem may be a good idea)<br>
<br>
</blockquote></div></div>