FreePBX 17 Static Routes

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.

Thank you for that input Eris,
However there is a problem. In my configuration on the PBX I have interface enx0 which is the internet facing interface. And it shows up in /etc/network/interfaces as it should .
However enx1 which connects to my internal network does not show up in the /etc/network/interfaces file. I have connectivity to this network and can ping the local subnet just fine. But it is not defined in the file. Only in the PBX software. And also this is FreePBX 17 running on Debian so I think this may be where the difference is.

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