System Config - Network Config and Static Routes

Modified on Wed, Aug 6 at 12:12 PM

This document explains the network configuration needed for FreePBX.


Because the FreePBX Server lives on a different subnet, static routes also need to be set up on the server in order to access other subnets.


In the latest iteration documented here (FreePBX 17 on Debian 12), this can be accomplished by editing the IP Interfaces files:

sudo nano /etc/network/interfaces


From there the file should look like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
  address 10.40.17.2
  netmask 20
  gateway 10.40.17.5
  dns-nameserver 8.8.8.8 8.8.4.4
  up ip route add 172.16.0.0/16 via 10.40.17.1 dev eth0
  up ip route add 10.0.0.0/8 via 10.40.17.1 dev eth0


The last two lines in the file allow the server to find the 172.16.0.0/16 (everything in the "data" networks) and 10.0.0.0/8 (everything on the security/voice networks).

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article