I need to create some static routes on the second interface in FreePBX17 running on Debian 12. I can create the routes using he ip route command and they work fine. But for the routes to be persistent across a reboot I need to store them somewhere. The FreePBX GUI settings for the network don’t seem to be located easily where I can find them in the shell. So I am not sure where to store these settings or how exactly.
In /etc/network/interfaces, under whichever interface you want to add the route, add the following on a new line:
post-up route add -net xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx gw xxx.xxx.xxx.xxx
those placeholders would be the network you want to reach, the netmask of that network, and the gateway, respectively. Then just do a sudo service networking restart.