Routes not beeing added / beeing deleted after some time

  • Hi,


    im having problems creating persistent routes on my OMV.


    I added a route in /etc/network/interfaces, which does not seem to get applied:


    Code
    iface eth0 inet static
        address 192.168.0.10
        gateway 192.168.0.1
        netmask 255.255.255.0
        dns-nameservers 208.67.222.222
        dns-search mm.home
        pre-down ethtool -s $IFACE wol g
        up route add -net 10.8.0.0 netmask 255.255.255.0 gw 192.168.0.2
        down route del -net 10.8.0.0 netmask 255.255.255.0 gw 192.168.0.2

    I also downloaded the route-plugin from omv-extras and set the route.
    This also does not seem to get applied.


    When im adding the route manually, via route add -net the route persists some time but seems to be getting deleted every now and then.
    If it persists long enough after manual entry, the hibernate/wakeup-process removes it again.


    Can anyone point me in the right direction ?
    Thanks in advance!

  • I tried to use "ip route" in the interfaces file, which works on my other debian 9 machines.


    It wont work for OMV sadly.


    Im gonna try getting a shell-script together to add the route periodically, if not set.

  • I found some script and customized it to my route.
    Its running in crontab every 5 minutes and it seems like its currenty working.


    If someone ever has the same problem and is finding this thread, here is the script i found with source-link:


Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!