Have been having some fun lately building an open source Home Internet Kill Switch using the OPNsense API
If your interested in taking a look here's the video, the OPNSense solution starts around 4 mins 8 seconds.
Also, here's the project page:
https://rlatour.com/esp32networkblocker/
(its Project 2)