Connman and persistent static route

Forum Forums General Software Connman and persistent static route

  • This topic has 7 replies, 6 voices, and was last updated Dec 2-9:20 pm by Xecure.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #46329
    Member
    Sephiroth

      Hello, I’m trying to add static route to my Antix OS, like this:
      sudo ip route add 10.69.0.2 via 10.69.0.102 dev eth1

      If I execute in shell this command it will apply, and everything works good.

      I tried to add in /etc/network/interfaces:
      up route add -net 10.69.0.2 via 10.69.0.102 dev eth1
      or
      post-up route add -net 10.69.0.2 via 10.69.0.102 dev eth1

      they haven’t effects.

      How can I do persistent route?
      I also tried a workaround adding a script in rc5 with S20 level and depends with resolvconf and connman, but it’s still not working.

      Thanks for support

      • This topic was modified 2 years, 5 months ago by Sephiroth.
      #46343
      Member
      Dzhigit
        Helpful
        Up
        0
        ::

        I tried to add in /etc/network/interfaces

        I am not sure if there is something different with your system, but at least in my /etc/network/interfaces file, the antiX developers left this comment:

        Used by ceni but not by connman

        • This reply was modified 2 years, 5 months ago by Dzhigit. Reason: accidentally pasted a link instead of comment from antiX
        • This reply was modified 2 years, 5 months ago by Dzhigit.
        #46357
        Moderator
        Brian Masinick
          Helpful
          Up
          0
          ::

          Did you actually enter:

          up route add -net 10.69.0.2 via 10.69.0.102 dev eth1

          Shouldn’t it be

          ip route add -net 10.69.0.2 via 10.69.0.102 dev eth1

          --
          Brian Masinick

          #46358
          Member
          Sephiroth
            Helpful
            Up
            0
            ::

            Did you actually enter:

            up route add -net 10.69.0.2 via 10.69.0.102 dev eth1

            Shouldn’t it be

            ip route add -net 10.69.0.2 via 10.69.0.102 dev eth1

            both commands in /etc/network/interfaces don’t work.

            Just the last one works by shell, how can I make persistent this route with connman?

            • This reply was modified 2 years, 5 months ago by Sephiroth.
            • This reply was modified 2 years, 5 months ago by Sephiroth.
            #46359
            Member
            Sephiroth
              Helpful
              Up
              0
              ::

              I tried to add in /etc/network/interfaces

              I am not sure if there is something different with your system, but at least in my /etc/network/interfaces file, the antiX developers left this comment:

              Used by ceni but not by connman

              Exactly, I just tried without results

              #46362
              Forum Admin
              anticapitalista
                Helpful
                Up
                0
                ::

                https://stackoverflow.com/questions/31943490/how-to-set-static-ip-address-using-connman-for-wifi-network

                may help.

                Philosophers have interpreted the world in many ways; the point is to change it.

                antiX with runit - leaner and meaner.

                #46365
                Moderator
                caprea
                  Helpful
                  Up
                  0
                  ::

                  What about putting the route shell command in /etc/rc.local ?
                  Connman and static route does not seem to be an easy-going .
                  Might helps
                  https://discourse.osmc.tv/t/persistent-static-routes-in-osmc/18873

                  Or perhaps ceni is a better option for you. You can convert to ceni with the antiX-wifi-switcher from menu.
                  ceni uses the etc/network/interfaces .

                  #46375
                  Member
                  Xecure
                    Helpful
                    Up
                    0
                    ::

                    After searching a bit for connman + persistant route search results, I agree with caprea. It seems to not be easy to do with connman.

                    Use the antix-wifi-switch program to switch to ceni (even if you are not using wifi) and try to see if you can set up the static routing with ceni (the script stops all connman related services and replaces /etc/resolv.conf symlink to use resolvconf instead of connman).

                    antiX Live system enthusiast.
                    General Live Boot Parameters for antiX.

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.