3CX Debian two nics

Status
Not open for further replies.

Zacharias

Joined
Apr 15, 2017
Messages
5
Reaction score
1
Hello,

I am planning to install 3CX on a Debian 9 machine using two NICs. The reason for two NICs is because our VoIP provider is IP based with a deticated modem for SIP trunk.

The primary NIC will be connected to the internal network where the phones are.
The secondary NIC will be connected to the provider’s modem.

I assume that a static route will be needed in order for the second NIC to forward the SIP traffic to the provider.

Any advice or feedback on the above scenario is much appreciated. Also an example of a static route will be very helpful.

Thank you in advance
 
Yes, exactly. You need a static route to provider and no default gateway on the second NIC.
Edit the /etc/network/interfaces file:
Code:
# 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 ens192
auto ens192
iface ens192 inet static
    address 10.10.10.10/24
    gateway 10.10.10.1
dns-nameservers 8.8.8.8

# Interface to provider
allow-hotplug ens224
auto ens224
iface ens224 inet static
    address 10.251.222.114/30

# static route to provider -- network 213.226.61.0/24
up route add -net 213.226.61.0/24 gw 10.251.222.113 dev ens224
 
Amazing, I can’t thank you enough @sip.bg
This is exactly what I was looking for.

I will give it a try and post back to thread.
 
  • Like
Reactions: sip.bg
You are welcome.
 
I'm giving this topic a bump, because I'm looking for a way to ONLY change the gateway IP of 3CX 15.5.
Is the above method a supported way to change the gateway IP? All other IP's and subnet have to remain the same in my situation, so I guess this will work, right?
 
You need to edit the /etc/network/interfaces file.This is the normal way of changing IP settings in Debian without web interface.
I don't know whether you can do it from the new Terminal in 3CX Dashboard.

Please note that IP address of the server should not be changed, if so, you need to reinstall 3CX, otherwise it will not function properly.
 
Last edited:
  • Like
Reactions: MpDay
As @sip.bg said, edit "interfaces", just one minor comment, since V15.5 SP2, if the LAN IP of the 3CX server changes, and re-installation is not required, although it would achieve the same result. The steps you can follow are:
  1. Change IP
  2. Log into the Management Console --> Dashboard where you should get a warning that the LAN IP has changed.
  3. Press on the warning and select the correct Interface from the drop-down, then press OK.
  4. Go to the Dashboard again and restart all services.
  5. (This step should not be necessary from SP3 onward) Go to "Extensions", edit each and every one, go to the Phone Provisioning tab, and in the Interface drop-down, make sure that the new IP/Interface is selected, then press OK.
Obviously after doing all this, if you have installed without using a Local FQDN, all IPs will have to be manually "pointed" to the new IP as the provisioning link will have changed to match the new IP.
One option to quickly overcome this last thing is Option 66 where you could give all the phone the new LAN IP automatically. Remote Phone should not have a problem as they use an FQDN.
Important! The most common thing I've seen when doing this is to forget to adjust the NAT rule on the firewall for the new IP!
 
  • Like
Reactions: sip.bg
As @sip.bg said, edit "interfaces", just one minor comment, since V15.5 SP2, if the LAN IP of the 3CX server changes, and re-installation is not required, although it would achieve the same result. The steps you can follow are:
  1. Change IP
  2. Log into the Management Console --> Dashboard where you should get a warning that the LAN IP has changed.
  3. Press on the warning and select the correct Interface from the drop-down, then press OK.
  4. Go to the Dashboard again and restart all services.
  5. (This step should not be necessary from SP3 onward) Go to "Extensions", edit each and every one, go to the Phone Provisioning tab, and in the Interface drop-down, make sure that the new IP/Interface is selected, then press OK.
Obviously after doing all this, if you have installed without using a Local FQDN, all IPs will have to be manually "pointed" to the new IP as the provisioning link will have changed to match the new IP.
One option to quickly overcome this last thing is Option 66 where you could give all the phone the new LAN IP automatically. Remote Phone should not have a problem as they use an FQDN.
Important! The most common thing I've seen when doing this is to forget to adjust the NAT rule on the firewall for the new IP!

Very good!
Changing of IP is excellent possibility.
 
Thanks NickD, this is useful information! I'm looking at your "important" note at the bottom, but in my case I only need to change the gateway IP, so this shouldn't have any impact on the NAT rules.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,880
Messages
589,533
Members
164,733
Latest member
HLISolutions