So you would like to cut off your internet at the push of a button? Nick Donaldson has shared a video that shows how you can pull it off with a Raspberry Pi. The developer used a Pi Zero W to monitor the switch and send alerts over WiFi to a router. A script watches for the alert and turns the external interface on/off.
The above video gives you a better idea how it all works.