Elastix HA Cluster is using real IP to connect

Status
Not open for further replies.

nhathq

Joined
Jun 26, 2016
Messages
22
Reaction score
0
Dear All,

I've setup Elastix 2.5 HA successfully with DRBD and Heartbeat. But I'm facing a problem which my clients cannot register their phone from outside :cry:
Server 1:
LAN IP: 192.168.x.6
DRBD IP: 10.11.12.1 (no gateway)
Server 2:
LAN IP: 192.168.x.7
DRBD IP: 10.12.12.2 (no gateway)
Virtual IP: 192.168.x.5
Every UDP ports which are need to be configured in Port Forwarding/NAT section, mapped to Internal IP (192.168.x.5) correctly.
The settings in /etc/asterisk/sip_general_custom.conf:
externip = my Internet IP address
localnet = 192.168.x.5/24
allowguest=no

I've found in the firewall log that the Elastix system answer connections from outside by 192.168.x.6 or 192.168.x.7 (it depends on which server is primary at that time).

Can you help me to solve this?
 
Hi

At first you need to setting up bind into asterisk sip settings and put the virtual IP address. So here: 192.168.x.5 instead of 0.0.0.0
Next, if you need to use the NAT, configure it.
It works like this for us
Avoid to use sip_general_custom.conf and use asterisk_sip settings into Freepbx GUI.
Delete the content of sip_general_custom.conf before using asterisk_sip settings
 
danardf said:
Hi

At first you need to setting up bind into asterisk sip settings and put the virtual IP address. So here: 192.168.x.5 instead of 0.0.0.0
Next, if you need to use the NAT, configure it.
It works like this for us
Avoid to use sip_general_custom.conf and use asterisk_sip settings into Freepbx GUI.
Delete the content of sip_general_custom.conf before using asterisk_sip settings
Thank you for your reply. I added the bind address = 192.168.x.5 to the sip_general_custom.conf and it worked. Now there is only 192.68.x.5 in the firewall log when communicating to each other. But I'm facing the next issue when IP Phones are in trouble with no sound after making calls. It seems that this issue is related to NAT but have not found the solution to fix yet. Because of some reason, I cannot deploy for IP Phones (from many locations) to connect via VPN connection right now. I will do it in the future, so IP Phones are "working" with Elastix system via Public Internet IP method. Can you show me a way to solve this?
 
@danardf: I followed your suggestion, delete all the content of sip_general_custom.conf, in "Asterisk SIP Settings" --> Advanced General Setiings --> set 192.168.x.5 in "Bind Address", set port to 5060 in "Bind Port". All extensions were configured with NAT = YES in the Extension module of Elastix.

IP Phones or Softphone can be registered successfully, but when making calls to other extensions (not to outside yet), there is still no sound. There is no drop/block action in firewall logs (the gateway of Elastix 2.5 system). Can you give me any advice for this situation?
 
Your issue is turning around the NAT, and / or routing.
You could try to click on Static IP address and on auto configure.
If the global network permits this configuration, your parameters should be set automatically in the case where you have a static IP address.
Check the DNS and default router settings too.
 
danardf said:
Your issue is turning around the NAT, and / or routing.
You could try to click on Static IP address and on auto configure.
If the global network permits this configuration, your parameters should be set automatically in the case where you have a static IP address.
Check the DNS and default router settings too.
I think it's because of NAT. The routing is ok, the DNS and default route are also ok. Our system is having static public IP. I tried to click on "Auto configuration" but the result is as below:
enPrkMW6kXQ9fN8KAToEIoiBEXGIa200Eldcl9Z71kNg64-Tbr9vLEijXNtA4mYrjczZ9nqjKUvhr-yHL5yaD4DX4Z09UzdDDXOoZjtiUuFI9W6DriYJqPm8nYoMD5ZoAsEdVdz407fPJhl95Xt_7aVjgKgBgujnSe5VheFvR3sJOfE5tusGS0AETXX0O8ACr2Ngh23LMiZJJu5IhLNHzdfhDa5ChBmwjA8Y3T3YUVPoTKPVAAderOR-p56v87svmvs7bkOcAv6oMBoH8tt9cjjrVkSAf-mKl_-pZmxvKwnGDaumLJfwlfN8fz_k9_UJX-SC74N6RCfqhqmZlHX_V6SC3IY5YvWzWpqzJV7gqfqIRsHmXsO39tF47mnrB7MqWNHGpUpWG8vv4ERe_TIaesC28RBS8M_w7Om4VxCSwqq1Rg1akah6OCXTXun8NnnoVaqSpXis3P3nawoS8ycgWdktWL4E6vSqcxTvON4myFVyW7nZL63RGtOWPvZPpmiDkzEfaNWLbY1nNXUGRZevFeCcVI0iy2rUV5H32Vdf1Bcg2_gKvFiJy9PDXWBjI6GFFTjfc_-6Skscu7oDcxk-EUVtiMlZKYo=w746-h452-no

As your experience, can you tell me which object can cause above error?
 
I doon't know if it's your browser which give this image.
In any cases, you can click on Static and put manually your parameters.
 
For your information. The NAT is explained into Elastix Without Tears and Elastix Easy.
Like i said, just use the books and read the sections about NAT.:wink:
 
danardf said:
I doon't know if it's your browser which give this image.
In any cases, you can click on Static and put manually your parameters.
I set with static IP and other parameters as yours. What about the "Bind port" (below the Bind Address), can I leave it blank?
 
No, you must to set your virtual IP address.
 
danardf said:
No, you must to set your virtual IP address.
Sorry for late respond. Yesterday I installed a new firewall for our system and removed the Endian Firewall. After that, Elastix system has been working like a charm. Conclusion, Endian Firewall is not suitable for Elastix or any VoIP system which need to be NAT with SIP.
 
Status
Not open for further replies.

Forum statistics

Threads
111,858
Messages
589,427
Members
164,698
Latest member
RRusev