FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

13308 questions

15799 answers

25520 comments

50179 members

0 votes
169 views 5 comments
by
RUT240 w/RutOS 7.

I want to use multipath with Zerotier

https://docs.zerotier.com/zerotier/multipath/

but this requires editing local.conf.

How can I do this on RutOS?

This is just for a POC, would probably be using more powerful Teltonika routers once we are past the POC phase.

1 Answer

0 votes
by

Hi,

By default, local.conf does not exist. You need to create local.conf file by yourself for manual configurations such as multipath. Manual configuration can be achieved by creating the file local.conf in the program's home directory /var/lib/zerotier-one. This allows you to set various configuration options, such as restricting the service to specific interfaces or enforcing the use of a different port. This file must be valid JSON as it can be re-written by zerotier-one.

Please follow the link below for more information:
https://wiki.archlinux.org/title/ZeroTier#Manual_configuration

Regards,
Ramandeep

Best answer
by
Hi,

I am trying to create the local.conf file but in my case, on my TRB142 device the var directory is linked to tmp. Doing an ls -l I get this way:

var -> tmp

When I create the local.config file in the zerotier directory it gets deleted after reboot (logical as it is tmp).

How can I make Zerotier apply the configuration I want if the file is deleted?

Thank you.

PS: I'm trying to set the low bandwidth mode in 1.10.3 with this:

{
  { "settings":
  {
    "lowBandwidthMode":true
  }
}
by

One workaround would be to create the local.conf in /opt/var/zerotier and create a symlink to it from rc.local:

/etc/init.d/zerotier stop
mkdir /tmp/zerotier 2>/dev/null
ln -sf /opt/var/zerotier/local.conf /tmp/zerotier
/etc/init.d/zerotier

by
Better solution yet: edit packages/network/services/zerotier/files/etc/init.d/zerotier and add your settings there before building your 1.10.3 package. This way the local.conf file will be rebuild after each reboot.
by
Thank you flebourse!!.

I will try.

You helped me in the other thread and now twice.

Thank you.

---

I'm looking at the file and it's a bit confusing for me.

setup_network() {
        local cfg="$1"
        local secret="$2"
        local node_id="$3"
        local args=""
        local network_id allow_global allow_managed allow_default

        config_get enabled "$1" 'enabled' 0
        config_get network_id $cfg 'network_id'
        config_get port $cfg 'port' '9993'
        config_get allow_global $cfg 'allow_global'
        config_get allow_managed $cfg 'allow_managed' '1'
        config_get allow_default $cfg 'allow_default'
 

How should the line be to allow low bandwidth mode?

config_get allow_default $cfg 'low_bandwith_mode' 'true' ?

Something like that?

Thank you.
by

Yes, but to be tested:


cat <<EOF > $CONFIG_PATH/local.conf
{
  { "settings":
    {
      "lowBandwidthMode":true
    }
}
EOF