3CX Debian two nics

Discussion in '3CX Phone System - General' started by Zacharias, Nov 28, 2017.

Thread Status:
Not open for further replies.
  1. Zacharias

    Joined:
    Apr 15, 2017
    Messages:
    5
    Likes Received:
    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
     
  2. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    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
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    NickD_3CX, Edi Kojsi and Zacharias like this.
  3. Zacharias

    Joined:
    Apr 15, 2017
    Messages:
    5
    Likes Received:
    1
    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.
     
    sip.bg likes this.
  4. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    You are welcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. MpDay

    Joined:
    Dec 1, 2017
    Messages:
    2
    Likes Received:
    0
    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?
     
  6. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 sip.bg, Dec 1, 2017
    Last edited: Dec 1, 2017
    MpDay likes this.
  7. NickD_3CX

    NickD_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Jun 2, 2014
    Messages:
    1,367
    Likes Received:
    83
    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!
     
    sip.bg likes this.
  8. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Very good!
    Changing of IP is excellent possibility.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. MpDay

    Joined:
    Dec 1, 2017
    Messages:
    2
    Likes Received:
    0
    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.
     
Thread Status:
Not open for further replies.