I am finding that when I try to set a persistent route in dietpi it is only good until power is lost.
I used the following command:
sudo ip route add 10.2.2.0/24 via 10.20.20.2
This works with reboots just fine but when I lost power the config was lost and it took me some time to figure out that the route being lost was the problem.
I tried adding the following to /etc/network/interfaces but it broke my traffic all together:
# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 10.20.20.16
netmask 255.255.255.0
gateway 10.20.20.1
dns-nameservers 10.20.20.1
up route add -net 10.2.2.0/24 gw 10.20.20.2 dev eth0
What is the correct way to add a permanent route on DietPi?