Zerotier-one.service file overwritten on 1.10.6 update. Is this normal?

As title says, when zerotier was updated on my debian 11 (proxmox lxc), “/lib/systemd/system/zerotier-one.service” was overwritten. No questions asked.
Should I expect this behaviour on every update?
Any way to prevent it?

The reason why I am asking it that I had modified the .service file to push nft rules to route traffic from zerotier NW to LAN while zerotier-one service is running.
If you can think of a better (more robust way, I mean) of getting to the same place, please let me know.

For referece purposes, this is modified .service file I would like to keep between updateas:

panchuz@zt:~$ cat /lib/systemd/system/zerotier-one.service
Description=ZeroTier One modificado por panchuz para acceder a LAN fisica


ExecStartPost= /usr/sbin/sysctl -w net.ipv4.ip_forward=1
ExecStartPost= /usr/sbin/nft add table ip zt-nat { chain post { type nat hook postrouting priority srcnat ; oifname “eth0” masquerade ; } ; }
ExecStopPost= /usr/sbin/nft delete table ip zt-nat
ExecStopPost= /usr/sbin/sysctl -w net.ipv4.ip_forward=0



You can make a seperate service unit for ipv4 forwarding and nft and let this unit start after the zerotier-one.service unit.

1 Like

That´s a nice workarround!!!
I will indeed.

Many Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.