Pavlos Parissis Posted October 31, 2010 Report Share Posted October 31, 2010 Does anyone know why the setting in Bind to specific IPv4 address is ignored? Even I have set it pbx listens on all addresses. This happens on Version: 3.4.0.3201 and on CentOS 5.4 Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted October 31, 2010 Report Share Posted October 31, 2010 Does anyone know why the setting in Bind to specific IPv4 address is ignored? The name of the setting is a little bit misleading. This applies only for multicast RTP. If you want to bind e.g. the SIP UDP port to a specific IP address 12.23.34.45 port 5060 and 6.5.4.3 port 8000, then you should use the setting "12.23.34.45:5060 6.5.4.3:8000" where you have the port right now ("5060"). Quote Link to comment Share on other sites More sharing options...
Pavlos Parissis Posted October 31, 2010 Author Report Share Posted October 31, 2010 The name of the setting is a little bit misleading. This applies only for multicast RTP. If you want to bind e.g. the SIP UDP port to a specific IP address 12.23.34.45 port 5060 and 6.5.4.3 port 8000, then you should use the setting "12.23.34.45:5060 6.5.4.3:8000" where you have the port right now ("5060"). I followed your suggestion and my conf is now like this <ip_http_port>192.168.78.10:80</ip_http_port> <ip_https_port>192.168.78.10:443</ip_https_port> <ip_sip_udp_port>192.168.78.10:5060</ip_sip_udp_port> <ip_sip_tcp_port>192.168.78.10:5060</ip_sip_tcp_port> <ip_sip_tls_port>192.168.78.10:5061</ip_sip_tls_port> <ip_snmp_port>192.168.78.10:161</ip_snmp_port> <ip_snmp_community>public</ip_snmp_community> <ip_tftp_port>192.168.78.10:69</ip_tftp_port> and now listens on specific IP, expect the last 2 UDP sockets. thanks [root@node-01 ~]# netstat -nap|grep pbx_01 tcp 0 0 192.168.78.10:5060 0.0.0.0:* LISTEN 2138/pbx_01 tcp 0 0 192.168.78.10:5061 0.0.0.0:* LISTEN 2138/pbx_01 tcp 0 0 192.168.78.10:80 0.0.0.0:* LISTEN 2138/pbx_01 tcp 0 0 192.168.78.10:22 0.0.0.0:* LISTEN 2165/sshd-pbx_01 tcp 0 0 192.168.78.10:443 0.0.0.0:* LISTEN 2138/pbx_01 udp 0 0 192.168.78.10:161 0.0.0.0:* 2138/pbx_01 udp 0 0 192.168.78.10:5060 0.0.0.0:* 2138/pbx_01 udp 0 0 192.168.78.10:69 0.0.0.0:* 2138/pbx_01 udp 0 0 0.0.0.0:54342 0.0.0.0:* 2138/pbx_01 udp 0 0 0.0.0.0:39380 0.0.0.0:* 2138/pbx_01 udp 0 0 :::49096 :::* 2138/pbx_01 udp 0 0 :::55132 :::* 2138/pbx_01 Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted November 1, 2010 Report Share Posted November 1, 2010 <ip_http_port>192.168.78.10:80</ip_http_port><ip_https_port>192.168.78.10:443</ip_https_port> <ip_sip_udp_port>192.168.78.10:5060</ip_sip_udp_port> <ip_sip_tcp_port>192.168.78.10:5060</ip_sip_tcp_port> <ip_sip_tls_port>192.168.78.10:5061</ip_sip_tls_port> <ip_snmp_port>192.168.78.10:161</ip_snmp_port> <ip_snmp_community>public</ip_snmp_community> <ip_tftp_port>192.168.78.10:69</ip_tftp_port> That looks good. Quote Link to comment Share on other sites More sharing options...
Pavlos Parissis Posted November 1, 2010 Author Report Share Posted November 1, 2010 That looks good. yes but pbx still listens on any IP for 4 ports [root@node-01 ~]# netstat -nap|grep pbx_01 tcp 0 0 192.168.78.10:5060 0.0.0.0:* LISTEN 2138/pbx_01 tcp 0 0 192.168.78.10:5061 0.0.0.0:* LISTEN 2138/pbx_01 tcp 0 0 192.168.78.10:80 0.0.0.0:* LISTEN 2138/pbx_01 tcp 0 0 192.168.78.10:22 0.0.0.0:* LISTEN 2165/sshd-pbx_01 tcp 0 0 192.168.78.10:443 0.0.0.0:* LISTEN 2138/pbx_01 udp 0 0 192.168.78.10:161 0.0.0.0:* 2138/pbx_01 udp 0 0 192.168.78.10:5060 0.0.0.0:* 2138/pbx_01 udp 0 0 192.168.78.10:69 0.0.0.0:* 2138/pbx_01 udp 0 0 0.0.0.0:54342 0.0.0.0:* 2138/pbx_01 udp 0 0 0.0.0.0:39380 0.0.0.0:* 2138/pbx_01 udp 0 0 :::49096 :::* 2138/pbx_01 udp 0 0 :::55132 :::* 2138/pbx_01 Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted November 1, 2010 Report Share Posted November 1, 2010 udp 0 0 0.0.0.0:54342 0.0.0.0:* 2138/pbx_01udp 0 0 0.0.0.0:39380 0.0.0.0:* 2138/pbx_01 udp 0 0 :::49096 :::* 2138/pbx_01 udp 0 0 :::55132 :::* 2138/pbx_01 RTP ports are always bound to 0.0.0.0 and ::. Also the DNS client sockets connect to 0.0.0.0 and ::. Because those ports are client ports and discard messages that dont match the SSRC or the DNS open query sequence number IMHO that should be okay. Quote Link to comment Share on other sites More sharing options...
Pavlos Parissis Posted November 1, 2010 Author Report Share Posted November 1, 2010 RTP ports are always bound to 0.0.0.0 and ::. Also the DNS client sockets connect to 0.0.0.0 and ::. Because those ports are client ports and discard messages that dont match the SSRC or the DNS open query sequence number IMHO that should be okay. so having 2 PBXs, which listen on different IPs, on the same node shouldn't cause any issues. thanks Quote Link to comment Share on other sites More sharing options...
Vodia PBX Posted November 1, 2010 Report Share Posted November 1, 2010 so having 2 PBXs, which listen on different IPs, on the same node shouldn't cause any issues. No, because those ports are allocated in a "random" fashion anyway. For DNS, the OS will pick a free port and for the RTP port, the PBX will try up to ten times to get a free port in the range specified. Quote Link to comment Share on other sites More sharing options...
Pavlos Parissis Posted November 1, 2010 Author Report Share Posted November 1, 2010 No, because those ports are allocated in a "random" fashion anyway. For DNS, the OS will pick a free port and for the RTP port, the PBX will try up to ten times to get a free port in the range specified. Nice Thanks again Quote Link to comment Share on other sites More sharing options...
Pavlos Parissis Posted November 1, 2010 Author Report Share Posted November 1, 2010 No, because those ports are allocated in a "random" fashion anyway. For DNS, the OS will pick a free port and for the RTP port, the PBX will try up to ten times to get a free port in the range specified. the below output confirms what you have said [root@node-03 ~]# netstat -nap|grep pbx_01 tcp 0 0 192.168.78.10:5060 0.0.0.0:* LISTEN 6340/pbx_01 tcp 0 0 192.168.78.10:5061 0.0.0.0:* LISTEN 6340/pbx_01 tcp 0 0 192.168.78.10:80 0.0.0.0:* LISTEN 6340/pbx_01 tcp 0 0 192.168.78.10:22 0.0.0.0:* LISTEN 6353/sshd-pbx_01 tcp 0 0 192.168.78.10:443 0.0.0.0:* LISTEN 6340/pbx_01 udp 0 0 0.0.0.0:39321 0.0.0.0:* 6340/pbx_01 udp 0 0 192.168.78.10:161 0.0.0.0:* 6340/pbx_01 udp 0 0 192.168.78.10:5060 0.0.0.0:* 6340/pbx_01 udp 0 0 192.168.78.10:69 0.0.0.0:* 6340/pbx_01 udp 0 0 0.0.0.0:33122 0.0.0.0:* 6340/pbx_01 udp 0 0 :::45184 :::* 6340/pbx_01 udp 0 0 :::36295 :::* 6340/pbx_01 unix 2 [ ] DGRAM 14622 6340/pbx_01 [root@node-03 ~]# netstat -nap|grep pbx_02 tcp 0 0 192.168.78.20:5060 0.0.0.0:* LISTEN 5540/pbx_02 tcp 0 0 192.168.78.20:5061 0.0.0.0:* LISTEN 5540/pbx_02 tcp 0 0 192.168.78.20:80 0.0.0.0:* LISTEN 5540/pbx_02 tcp 0 0 192.168.78.20:22 0.0.0.0:* LISTEN 5572/sshd-pbx_02 tcp 0 0 192.168.78.20:443 0.0.0.0:* LISTEN 5540/pbx_02 udp 0 0 0.0.0.0:53900 0.0.0.0:* 5540/pbx_02 udp 0 0 0.0.0.0:49937 0.0.0.0:* 5540/pbx_02 udp 0 0 192.168.78.20:161 0.0.0.0:* 5540/pbx_02 udp 0 0 192.168.78.20:5060 0.0.0.0:* 5540/pbx_02 udp 0 0 192.168.78.20:69 0.0.0.0:* 5540/pbx_02 udp 0 0 :::46844 :::* 5540/pbx_02 udp 0 0 :::32894 :::* 5540/pbx_02 unix 2 [ ] DGRAM 13715 5540/pbx_02 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.