Frequently Asked Question

Changing IP on Sangoma FreePBX17 ISO
Last Updated 2 hours ago

This article explains how to change a Sangoma FreePBX 17 server from using DHCP to a static IPv4 address, and how to disable IPv6 using sysctl.

Before making changes

When changing network settings on a remote PBX, there is a risk of losing connectivity if the new address, gateway or subnet is incorrect. Confirm the correct network details before proceeding:

  • Static IP address
  • Subnet size or netmask
  • Default gateway
  • DNS servers
  • Network interface name

1. Identify the network interface

List the available network interfaces:

ip -br link

Example output:

lo               UNKNOWN        00:00:00:00:00:00
pbxeth0          UP             bc:24:11:28:ce:5a

In this example, the active network interface is pbxeth0.

2. Edit the network configuration

Open the network interfaces file:

nano /etc/network/interfaces

A typical default configuration may 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 pbxeth0
iface pbxeth0 inet dhcp

3. Change the interface from DHCP to static

Replace the DHCP line:

iface pbxeth0 inet dhcp

with a static configuration, for example:

iface pbxeth0 inet static
    address 10.1.0.59/22
    gateway 10.1.1.3
    dns-nameservers 10.1.1.5 10.1.1.4

The completed file would then look similar to:

# 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 pbxeth0
iface pbxeth0 inet static
    address 10.1.0.59/22
    gateway 10.1.1.3
    dns-nameservers 10.1.1.5 10.1.1.4

Notes on the settings

  • address is the static IP address with CIDR notation.
  • gateway is the default router for outbound traffic.
  • dns-nameservers defines the DNS servers the PBX will use.
  • Ensure the IP address is not already in use elsewhere on the network.

4. Disable IPv6

Create or edit a sysctl configuration file for IPv6 settings:

nano /etc/sysctl.d/99-disable-ipv6.conf

Add the following lines:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Save the file, then apply the settings:

sysctl --system

5. Restart networking

Restart the networking service to apply the IPv4 changes:

systemctl restart networking

If the command completes without errors, reboot the server:

reboot

6. Verify the new configuration

After the reboot, confirm the new IP address has been applied:

ip addr show pbxeth0

Check the default gateway:

ip route

Check DNS resolution:

ping -c 4 8.8.8.8
ping -c 4 google.com


Troubleshooting

Networking does not come back after restart

Common causes include:

  • Incorrect interface name
  • Wrong subnet or CIDR
  • Incorrect gateway
  • IP address conflict
  • Typing errors in /etc/network/interfaces

Check the file contents carefully:

nano /etc/network/interfaces

Check the interface name again:

ip -br link

DNS resolution fails

If the PBX can ping IP addresses but not hostnames, verify the DNS servers configured in:

/etc/network/interfaces

Then test again with:

ping -c 4 google.com

IPv6 still appears enabled

Recheck the configuration file:

nano /etc/sysctl.d/99-disable-ipv6.conf

Re-apply settings:

sysctl --system

Then reboot if necessary:

reboot

This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...