Skip to content
Go back

How to Change FreePBX IP Address on Debian 12 - Complete Guide 2026

Changing your FreePBX server’s IP address requires careful configuration to prevent SIP registration failures and service disruptions. This comprehensive guide walks you through the complete process on Debian 12.

How to Change FreePBX IP Address on Debian 12

Step 1: Backup Current Network Configuration

Before making changes, create a backup:

sudo cp /etc/network/interfaces /etc/network/interfaces.backup

Step 2: Edit Network Configuration File

Open the network configuration file:

sudo nano /etc/network/interfaces

Locate your primary network interface (typically eth0, ens18, or enp0s3) and modify the static IP configuration:

# Primary network interface
auto eth0
iface eth0 inet static
    address 192.168.1.100      # Your new IP address
    netmask 255.255.255.0      # Subnet mask
    gateway 192.168.1.1        # Default gateway
    dns-nameservers 8.8.8.8 8.8.4.4  # DNS servers

Important Notes:

Step 3: Apply Network Changes

Restart the networking service:

sudo systemctl restart networking

Alternative method (if the above doesn’t work):

sudo ifdown eth0 && sudo ifup eth0

Or perform a complete system reboot for guaranteed changes:

sudo reboot

Step 4: Verify New IP Address

After restart, confirm the IP change:

ip addr show eth0

Test network connectivity:

ping -c 4 8.8.8.8

Method 2: Update FreePBX Configuration

After changing the network IP, you must update FreePBX to recognize the new address.

Update Asterisk SIP Settings

Reload FreePBX modules:

fwconsole ma reload

Regenerate all Asterisk configurations:

fwconsole reload

Update Network Settings in FreePBX GUI

  1. Access FreePBX web interface at: http://NEW_IP_ADDRESS
  2. Navigate to Settings → Asterisk SIP Settings
  3. Update the following fields:
    • Bind Address: Set to 0.0.0.0 or your new IP
    • External Address: Update if using NAT
    • Local Networks: Add your new subnet
  4. Click Submit and Apply Config

Verify Asterisk Bindings

Check SIP bindings:

sudo asterisk -rx "sip show settings" | grep "IP address"

For PJSIP (FreePBX 17 default):

sudo asterisk -rx "pjsip show settings" | grep bind

Restart FreePBX Services

Complete the update:

sudo fwconsole restart

Troubleshooting Common Issues

Issue 1: Cannot Access FreePBX GUI After IP Change

If you cannot load the FreePBX web interface after changing the IP address, the firewall may be blocking your new connection.

FreePBX Network Trust Configuration

Solution A: Add Trusted Network in FreePBX

  1. Access via SSH
  2. Navigate to Admin → System Admin → Port Management
  3. Add your new network to the trusted list

Solution B: Update IPTables Firewall Rules

Allow your new IP address or subnet:

# Allow specific IP address
sudo iptables -I INPUT -s 10.230.23.179 -j ACCEPT

# Or allow entire subnet
sudo iptables -I INPUT -s 10.230.23.0/24 -j ACCEPT

Save IPTables rules permanently:

sudo netfilter-persistent save

Solution C: Temporarily Disable Firewall (Testing Only)

sudo fwconsole firewall disable

⚠️ Warning: Only use this for troubleshooting, then re-enable immediately.

Issue 2: SIP Phones Not Registering

Update SIP/PJSIP bind address:

sudo nano /etc/asterisk/pjsip.transports.conf

Ensure transport binds to the correct IP or 0.0.0.0:

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060

Reload PJSIP:

sudo asterisk -rx "module reload res_pjsip.so"

Issue 3: One-Way Audio or No Audio

Update RTP settings:

sudo nano /etc/asterisk/rtp.conf

Set correct RTP address:

rtpstart=10000
rtpend=20000

In FreePBX GUI:


Post-Change Verification Checklist

Network connectivity test:

ping -c 4 google.com

FreePBX service status:

fwconsole chown
fwconsole reload
systemctl status freepbx

Asterisk connectivity:

sudo asterisk -rvvv
core show settings

Test SIP registration:

Check trunk connectivity:


Additional Security Recommendations

After changing your FreePBX IP address:

  1. Update fail2ban whitelist:
sudo nano /etc/fail2ban/jail.local
  1. Review firewall rules:
sudo fwconsole firewall rules
  1. Update SSL certificates if IP-based

  2. Notify VoIP providers of IP change if using IP authentication

  3. Update DNS records if applicable


Alternative: Using NetPlan (Ubuntu-based Systems)

If you’re using a Ubuntu-based FreePBX installation with NetPlan:

sudo nano /etc/netplan/00-installer-config.yaml

Configuration example:

network:
  version: 2
  ethernets:
    eth0:
      addresses:
        - 192.168.1.100/24
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]

Apply changes:

sudo netplan apply

Conclusion

Changing your FreePBX IP address on Debian 12 is straightforward when following these steps carefully. Remember to:

By following this guide, you can safely migrate your FreePBX server to a new IP address without service disruption.



Share this post on:

Next Post
How to Change FusionPBX IP Address Safely (Without Breaking SIP, RTP & FreeSWITCH)