Unable to Delete Default Route on LibreELEC - Help Needed

  • 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):

    Code
    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):

    Code
    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

    Code
    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.


    1. Can anyone tell me if I can remove the default route and where to look for that?
    2. Is there a better way to make a kill switch for when the VPN is disconnected?

    Thanks to whomever can assist!

  • I have a hunch that deleting the default route results in ConnMan detecting the deletion and automatically recreating the route as it requires there to be one. So instead of deleting .. what happens if you change the default route to a value that effectively results in no routing? - NB: I would expect Kodi to throw some errors, as these days it expects to be internet connected.