I'm running into an issue with my LibreELEC system where I'm trying to disable the default route when I am not on a VPN, but nothing seems to work. I am trying to basically make a kill switch so the system can only reach local devices if the vpn is down. I am on a Raspberry Pi 4 4GB running Libreelec 12.0.1. No plugins installed, I just SSH and try to remove the route.
ip route (as it is now, no vpn):
LibreELEC:~ # ip route
default via 192.168.0.1 dev wlan0
192.168.0.0/24 dev wlan0 scope link src 192.168.0.7
192.168.0.1 dev wlan0 scope link
Here are route delete commands I tried (ip and route):
ip route del default
ip route del default via 192.168.0.1
ip route del default via 192.168.0.1 dev wlan0
ip route del 0.0.0.0/0
route del default gw 192.168.0.1
route del -net 0.0.0.0 gw 192.168.0.1 netmask 0.0.0.0 dev wlan0
/storage/.config/connman/main.conf
PreferredTechnologies = ethernet,wifi
AllowHostnameUpdates = false
AutoConnectRoamingServices = false
DefaultAutoConnectTechnologies =
Tried adding a service file with the route delete commands
Tried adding a crontab for this too, on reboot and every minute
Every single attempt did nothing to my default route. I tried deleting other routes and they deleted just fine. It's just the default route.
- Can anyone tell me if I can remove the default route and where to look for that?
- Is there a better way to make a kill switch for when the VPN is disconnected?
Thanks to whomever can assist!