Block packets from other device connected to wifi
Hi, 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. Any leads will be helpful.
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)
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@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)
On Fri, 16 Feb 2018 23:09:19 +0530, Tarun Batra said:
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.
Is it 'ping' specifically? Or any packets? Does device B have enough smarts to allow a config to drop packets from device A? And as I said previously - what problem are you trying to solve by stopping A from pinging B?
participants (2)
-
Tarun Batra -
valdis.kletnieks@vt.edu