How do I add static routes to 3CX on Debian?

Discussion in '3CX Phone System - General' started by checkinyyz, Jan 14, 2018.

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

    Joined:
    Dec 17, 2017
    Messages:
    47
    Likes Received:
    0
    I used the PBX Express to install 3CX on AWS so it's Debian 8 I believe. When on VPN there's no audio on calls and our consultant said it's because 3CX has no route back to our office devices, and that I need to "add a static route on 3CX to 192.168.0.4/24 with the LAN of your VPN Server as the next hop, that will fix your issues." I don't see how to do that in 3CX but he then said "you do it from Linux or Windows, it's very easy to do" and then pointed me to a website that said for Debian 8 one command is:

    ROUTE ADD -NET 10.10.10.0 NETMASK 255.255.255.0 GW 192.168.1.1 DEV ETH0

    When I type Route on the 3CX command line it says command not found. Is there a different way I'm supposed to do this?
     
  2. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    This is the typical way to configure network interfaces and add static route on Debian 8 system, without web interface. Note the syntax for Debian 9 is slightly different.
    Into this example eth0 interface has address 10.10.10.10/24 and default gateway 10.10.10.1
    The eth1 interface has address 10.251.222.114/30 without gateway.


    Edit the /etc/network/interfaces file:

    nano /etc/network/interfaces

    # Debian 8 configuration
    # 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
    auto eth0
    iface eth0 inet static
    address 10.10.10.10
    netmask 255.255.255.0
    gateway 10.10.10.1
    # dns-nameservers 8.8.8.8

    # Optional second network interface (to provider, etc.)
    allow-hotplug eth1
    auto eth1
    iface eth1 inet static
    address 10.251.222.114
    netmask 255.255.255.252

    # route to SIP provider via second interface card
    up route add -net 213.226.61.0/24 gw 10.251.222.113 dev eth1


    Add routing you need via eth0 or eth1 interface card. Reboot the system, so changes take effect.

    However, you case is strange, as you normally should have default gateway on eth0 interface, which means traffic to all networks, i.e. 0.0.0.0/0, is routed through it, without need of adding additional routes.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 sip.bg, Jan 14, 2018
    Last edited: Jan 14, 2018
Thread Status:
Not open for further replies.