[asterisk-users] tcpbind and source IP address
ksyblast at gmail.com
Mon Mar 13 06:31:43 CDT 2017
netstat -nlp | egrep '506'
tcp 0 0 192.168.0.177:5061 0.0.0.0:* LISTEN
udp 0 0 192.168.0.177:5060 0.0.0.0:*
Still, the problem is with *outgoing* *TCP* packets originated from
asterisk. Source IP is set to the first IP address of the interface only
when TCP is used. As I understand, the application (chan_sip in this case)
should request kernel to use the specific source IP address (used in bind
directive) for outgoing packets, however it seems to be done only for UDP.
For outgoing packets on TCP/5061 I see the following:
IP *192.168.0.172*.47596 > <mydestip>.5061: Flags [S], seq 2529313754, win
29200, options [mss 1460,sackOK,TS val 82765588 ecr 0,nop,wscale 7], length
And with UDP as transport:
IP *192.168.0.177*.5060 > <mydestip>.5060: SIP: OPTIONS ....
пн, 13 мар. 2017 г. в 13:55, Joshua Colp <jcolp at digium.com>:
> On Mon, Mar 13, 2017, at 03:52 AM, Kseniya Blashchuk wrote:
> > Hi!
> > Attached sip.conf and interface config as well. In this case we use only
> > TLS, but I have checked with TCP - same situation, 192.168.0.172 is used
> > as
> > a source. For UDP 192.168.0.177 is used as expected.
> Does the output of netstat -a confirm that it is bound to only that IP
> address? If so, then it seems chan_sip has done its part.
> Joshua Colp
> Digium, Inc. | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> Check out the new Asterisk community forum at:
> New to Asterisk? Start here:
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users