Ok. Then, maybe, you could open a terminal in your PC and try manually the following commands (the idea is to go step by step to check if all the commands are installed before setting up the HA stuff): Step 1.-nmap is needed so let’s see if this works:
If you run all the steps without errors you should have the IP address of your device when running step 5, and we can join the commands to build the overall script.
If you found errors in a given step you have to find out how to install that command in Windows. I am not able to provide any help here but hopefully others may help.
Good luck!
@timseebeckI thank you for your tutorial which is very good explained.
I have followed all the instructions using my pi3 (dietpi raspbian image) as host and my router R7000 with asuswrt. I have issued the command manually to test it “control_internet.sh 2c:0e:3d:68:72:20 on” to disconnect my internet on my phone which is connected through WiFi obviously. Apparently arpspoof if not disconnecting my phone from the internet as I’m still able to surf even with mobile connection (4G) turned off.
Thanks.
I don’t see anything wrong in your setup so I can only suggest to double-check your phone’s MAC address. I would also try to run this command in another terminal:
arp -an | grep 2c:0e:3d:68:72:20
before AND after you run control_internet.sh 2c:0e:3d:68:72:20 on; just to see that the IP that is given to your phone has not changed.
Finally, as my first disclaimer states, I’m just a Google-fu guy with very little knowledge about what is really happening underneath these commands or router’s performance. Sorry
I’m trying to make a custom component to do it, as i would like to HomeAssistant manage the whole thing. What i’ve done so far: create switches based on IP, pass it to main script array. Get IP address of router and its MAC address. At the moment i’m stucked at getting MAC address of client basically send packet. I know that scapy needs to run as root so i granted privileges to python but still no success. Anybody willing to help me with it? all info in arpspoof.readme
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!
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