can you explain how your component works?
Hi gang – love this discussion and the great ideas. Appreciate the inspiration.
I’ve got a (derivative, but hopefully still useful) idea for a component that takes a list of MAC addresses (plus various configuration options) and, for each, automatically creates a group similar to @timseebeck’s (with immediate kill switches, timed switches, usage monitoring, etc.). Idea is to make something that is instantly expandable when a new device-to-manage comes onto the scene.
Fortuitous timing: I’ve been tinkering with this for a while specifically so we didn’t have to buy a Disney Circle.
I’ll chime in when I have more; perhaps we can collectively collaborate on getting this into core.
I used the same technique per @timseebeck opening post ARP spoofing but done in Python with use of scapy
library, you can read all this in my repo under arpspoof markdown
It’s not a problem to create a group with custom component and some automation but, everyone’s needs is different regarding automation, so that why i came up with simple idea in creating switches based on list of IPs and you can do whatever you like to do with them I might try to tweak it to take MAC address too.
Creating switches is a great idea. I’m really considering to move to your approach (problem is that I’m a big fan of “if it works, don’t touch it”, and I have to say that my setup is running perfectly for months). So far, I extended the idea up to four devices as next picture shows.
The main drawback for me of your approach is that it is IP-based (instead of MAC-based). My router is not able to give a fixed IP to a device depending on its MAC, although it is true that I could setup static IPs to my children tablets. Anyway, I’ll continue to follow your updates and maybe in a near future I’ll try your component (I’m considering to move to a fresh install of Raspbian Stretch with Python 3.6 in the short term).
Thanks for sharing your work!
I created a special topic for my component so that your approche and related questions are not mixed with mine.
That’s perfect. I tried to edit my first post to include an advice that there is a component for this and a link to your topic but it seems very old posts cannot be edited.
Anyway, I hope everyone reads this last message and go using your approach.
Thanks for sharing!
just found a docker image that includes dsniff alpine/arm docker can i add this to hassio then access it. soz for the noobness with docker im only just learning it in depth
Hi, your work gave a idea and i was managed to improve it a bit to work with any kind of device and also use for multiple devices.
Have allok here:
can you make Hassio Add-on ?
Thanks. Used this to cut internet on my firetv. you may want to add the following on the command line switch to detect if it is on or not:
command_state: "ps -ef | grep 'arpspoof -i enp1s0 -t 192.168.0.1 192.168.0.254' | grep -v grep | awk '{print $2}' | wc -l"
value_template: '{{ value >= "1" }}'
Also a typo on the page: chmod is missing on sudo +s /usr/sbin/arpspoof
Thank you for the code. I use it on start up script to permanently disable the internet access of all my IoT devices (no more phone home)
anyone got this working Hassio?
Yes, me three with Hassio install. My kid is out of control with youtube. This is the solution to my problem
Well, Long time ago i was searching for a way to implement some kind of Internet kill switch. i came a cross an article that shows how to use arpspoof in order to that. the problem was that alpine does not support arpspoof so i have developed dockere container with arpspoos warpped with python flask and here is the result.
Finally, got it working.
ArpSpoof docker
https://en.techblog.co.il/2021/03/15/home-assistant-cut-internet-connection-using-arpspoof/
nice guide, easy to follow and setup