Solved 2 Network Cards help

Status
Not open for further replies.

Gonzalo

Joined
Nov 2, 2017
Messages
5
Reaction score
0
Hello, I have a server configured with 3cx15, I have it in its original version based on Debian. I have 2 network cards installed, one I connect to my SIP and the other I connect to the internet in general with my extensions.

I can't get the 2 cards to work with their respective configurations.

I found this guide in which the last point describes my situation but offers a solution for Windows Server but not for my current Debian configuration.

Is there anything like that solution to apply to my debian-based 3cx15?

thanks for your help
 
So yes you do the exact same steps substituting the Linux commands for the Windows ones. If you aren't familiar with how to do it, the I'd recommend installing 3CX on a Windows machine. If you don't know how to do it in Debian, then you shouldn't use Debian because when something goes wrong (and it will) you won't know what to do. Don't put yourself in that position.
 
  • Like
Reactions: YiannisH_3CX
So yes you do the exact same steps substituting the Linux commands for the Windows ones. If you aren't familiar with how to do it, the I'd recommend installing 3CX on a Windows machine. If you don't know how to do it in Debian, then you shouldn't use Debian because when something goes wrong (and it will) you won't know what to do. Don't put yourself in that position.
Thanks for the answer, at this moment we can't think about buying windows server licenses, so from the beginning we did it in debian.

The guide solution talks about "Windows Routing and Remote access", I haven't find a similar feature in Debian and I find it curious that the same official 3cx guides don't talk about that solution outside Windows.

isn't there something like that in debian?
 
  • Like
Reactions: ThomasD_3CX
There are issues with 2 network cards in Debian, if web interface is installed from Debian.org ISO.

If you install Debian from 3CX ISO there are no issues, you may have as many cards as you like, VLAN interfaces, aliases.
The main interface (e.g. eth0) must have default gateway, all other cards -- no gateway, only IP address and netmask. Use static routes to send traffic over these interfaces. The 3CX must be installed on default interface (with gateway), where you have also access to internet (with NAT). The IP address on this interface can't be changed without reinstalling the 3CX.

Code:
#edit network configuration file
nano  /etc/network/interfaces
 
# 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             #default IP address of 3CX, can't be changed after installation
    netmask 255.255.255.0
    gateway 10.10.10.1
dns-nameservers 8.8.8.8

# second interface to SIP provider
allow-hotplug eth1
auto eth1
iface eth1 inet static
    address 10.250.250.2           #IP address of LAN card, used for SIP provider (private LAN)
    netmask 255.255.255.252

#static route to provider
up route add -net 213.226.61.0/24 gw 10.250.250.1 dev eth1

The above is the code for adding second LAN card (with sample IP addresses), if installed from 3CX ISO. You need to restart network services or better reboot the machine, in order settings to take effect.
 
Last edited:
Thanks @sip.bg, this makes more sense, all works but can't make calls.

I've seen the routes and found that the netmask doesn't match my SIP.

Can I in the last line of my /etc/network/interfaces add that netmask?
 
Thanks @sip.bg, this makes more sense, all works but can't make calls.

I've seen the routes and found that the netmask doesn't match my SIP.

Can I in the last line of my /etc/network/interfaces add that netmask?

The line:
Code:
#static route to provider

up route add -net 213.226.61.0/24 gw 10.250.250.1 dev eth1
defines route with netmask 255.255.255.0 to the provider via your gateway (example: 10.250.250.1) to your SIP provider. Is this what you are asking ?
You can check current routes with the following command:
Code:
route
If not seeing expected results, check for typos in the 'interfaces' file. Note machine must be rebooted before settings take effect.

Note in Debian 9 the syntax for defining address of a network card may be:
Code:
address: 10.250.250.2/30
Refer to primary card for proper format.
 
The line:
Code:
#static route to provider

up route add -net 213.226.61.0/24 gw 10.250.250.1 dev eth1
defines route with netmask 255.255.255.0 to the provider via your gateway (example: 10.250.250.1) to your SIP provider. Is this what you are asking ?
You can check current routes with the following command:
Code:
route
If not seeing expected results, check for typos in the 'interfaces' file. Note machine must be rebooted before settings take effect.

Note in Debian 9 the syntax for defining address of a network card may be:
Code:
address: 10.250.250.2/30
Refer to primary card for proper format.

Yes, i put the command route and i see the default netmask (255.255.255.0) but not my sip mask (255.255.255.248)

i try to put manually the netmask with the following command:

Code:
route add -net 192.168.155.0/24 netmask 255.255.255.248 gw 192.168.150.1 dev eth1

but, i restart the network services and nothing change applies. i restart the server and again, nothing change aplies.

i'm google it some other comands to put in the route for fix it but at the moment I haven't found.
 
The command should look like:
Code:
up route add -net 192.168.155.0/24 gw 192.168.155.1 dev eth1
but this is strange, what is the address of your eth1 card ?
Are you using Debian 8 or 9 ?

Send me a Private message with all the details about eth0, eth1 configuraton, SIP provider address, etc., if you don't want to make them visible to everybody (i.e. sensitive information).
 
Route must be:
Code:
up route add -net 192.168.155.0/29 gw 192.168.155.1 dev eth1
and will work if the SIP server has address between 192.168.155.3 and 192.168.155.6
 
  • Like
Reactions: Gonzalo
I love Linux...no registry to get hosed.
 
  • Like
Reactions: gigaboy
Route must be:
Code:
up route add -net 192.168.155.0/29 gw 192.168.155.1 dev eth1
and will work if the SIP server has address between 192.168.155.3 and 192.168.155.6

Yes! that is the right code.

all works perfectly. thanks a lot for your help :D
 
Glad to hear the issue in now resolved
 
Status
Not open for further replies.

Forum statistics

Threads
111,879
Messages
589,530
Members
164,731
Latest member
hrhrohit