K
K
kovalr2015-12-30 14:09:00
Asterisk
kovalr, 2015-12-30 14:09:00

Elastix (Asterisk) how to set up two network cards?

You need to connect two network cards to Elastix (Asterisk). NIC1 looks directly to the Internet at an address, say 173.0.0.10. NIC2 looks to the local network, 192.168.1.1.
SIP users in LAN sit under IP 192.168.1.20 - 192.168.1.30
Some users will work from LAN, the other part from the Internet.
It is necessary to make sure that the traffic of LAN users goes through the internal interface of NIC 2 and does not go outside.
Internet users must go through the external network.
You need to connect two network cards. On the server, register a static route for the external interface, for example, in 173.0.0.1.
For users who have a VoIp server address in LAN, register as 192.168.1.1, for users with the Internet - 173.0.0.10.
What else needs to be done to make it work? Will such a scheme work correctly? Has anyone tried this wiring diagram?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nApoBo3, 2015-12-30
@nApoBo3

This scheme is workable, you need to register a default route on the interface gateway 173.0.0.10, the route to the local network will register itself if the subnet mask is correctly specified. But keep in mind that there are a lot of problems with NAT that you need to be able to solve.
I highly recommend that you contact the experts. Your level of knowledge, judging by the questions, will result in large financial losses if the PBX is connected to any external lines (city, GSM and VOIP).

M
mureevms, 2015-12-30
@mureevms

I have done pretty much the same.
There is no need to prescribe any route, they will already be on the same subnet. The only thing is to specify an additional local address in the asterisk settings.

A
alexdora, 2015-12-30
@alexdora

How to organize the correct operation of Asterisk on multiple network interfaces? here, read my question. You may not notice anything in common, but in essence the tasks are similar and most likely there will be the same problem as mine. If you have two network cards and one looks outside, the second looks into the local area, then it will be easiest to do a trick with your ears, which nApoBo3 briefly mentioned , namely, all users connect to NIC1 (Internet interface). Just forward local users through NAT from NIC2 to NIC1 without bringing them to the Internet and limit the access of local peers by IP address or IP subnet by the internal settings of each extension
As I myself ran into, not everything works correctly, because Aster is initially configured for one specific address. And this is most likely due to all sorts of functions bypassing NAT and UDP traffic. I do not argue, it is still possible to solve this problem by writing each extension to the NAT directive. But there is a choice of 4 points and I didn’t have much time to test all the options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question