我是 freeswitch 世界的新手,我被黑了,有人使用我的网关并在没有任何身份验证的情况下初始化来自未注册用户的调用,正如我猜测的那样(在我自己测试之后),如果我发送一个 UDP 邀请数据包在 linux 中使用 nc 命令到 freeswitch 服务器,如下所示:
$ nc -u x.x.x.x 5060 < invite
invite file contain the following :
INVITE sip:+99xxxxxxx@x.x.x.x SIP/2.0
Via: SIP/2.0/UDP x.x.x.x:5060
Max-Forwards: 70
To: Bob <sip:+99xxxxxx@xxx.xxx.xxx.xxx>
From: Alice <sip:101@x.x.x.x>;tag=1928301774
Call-ID: a84b4c76e66710@pc33.atlanta.com
CSeq: 314159 INVITE
Contact: <sip:101@192.168.15.50>
Content-Type: application/sdp
Content-Length: 142
v=0
o=ibc 1090098764 894503441 IN IP4 192.168.1.33
s=-
c=IN IP4 192.0.2.200
t=0 0
m=audio 33445 RTP/AVP 98 97 8 0 3 101
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=zrtp
我发现了以下内容:
用户 101 是未注册用户,数据包中没有身份验证 header ,即使 freeswitch 允许通过我的网关进行调用。
那么在通过网关发起调用之前,有什么方法可以验证调用者的用户名和密码吗?
最佳答案
我的第一个猜测是检查 sofia.conf.xml 寻找
<param name="accept-blind-auth" value="true"/>
这里有关于 FS 中 sip 身份验证的更多详细信息: http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files#Auth
关于networking - 自由切换认证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14293242/