您好,我刚刚使用 freepbx 安装了一个新的星号配置并注册了一个 SIP 帐户。
我使用我的提供商数据设置了 SIP 中继,使用星号 -vvvr命令启动控制台进行调试,然后我注意到日志被以下条目淹没:
== Using SIP RTP CoS mark 5
-- Executing [00088884600972595117946@from-sip-external:1] NoOp("SIP/XXX.XXX.58.107-00000355", "Received incoming SIP connection from unknown peer to 00088884600972595117946") in new stack
-- Executing [00088884600972595117946@from-sip-external:2] Set("SIP/XXX.XXX.58.107-00000355", "DID=00088884600972595117946") in new stack
-- Executing [00088884600972595117946@from-sip-external:3] Goto("SIP/XXX.XXX.58.107-00000355", "s,1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("SIP/XXX.XXX.58.107-00000355", "1?checklang:noanonymous") in new stack
-- Goto (from-sip-external,s,2)
-- Executing [s@from-sip-external:2] GotoIf("SIP/XXX.XXX.58.107-00000355", "0?setlanguage:from-trunk,00088884600972595117946,1") in new stack
-- Goto (from-trunk,00088884600972595117946,1)
-- Executing [00088884600972595117946@from-trunk:1] Set("SIP/XXX.XXX.58.107-00000355", "__FROM_DID=00088884600972595117946") in new stack
-- Executing [00088884600972595117946@from-trunk:2] NoOp("SIP/XXX.XXX.58.107-00000355", "Received an unknown call with DID set to 00088884600972595117946") in new stack
-- Executing [00088884600972595117946@from-trunk:3] Goto("SIP/XXX.XXX.58.107-00000355", "s,a2") in new stack
-- Goto (from-trunk,s,2)
-- Executing [s@from-trunk:2] Answer("SIP/XXX.XXX.58.107-00000355", "") in new stack
-- <SIP/XXX.XXX.58.107-00000352> Playing 'digits/8.ulaw' (language 'en')
-- <SIP/XXX.XXX.58.107-00000351> Playing 'digits/9.ulaw' (language 'en')
-- <SIP/XXX.XXX.58.107-0000034f> Playing 'digits/6.ulaw' (language 'en')
-- Executing [s@from-trunk:5] SayAlpha("SIP/XXX.XXX.58.107-00000353", "00088884400972595117946") in new stack
-- <SIP/XXX.XXX.58.107-00000353> Playing 'digits/0.ulaw' (language 'en')
-- Executing [s@from-trunk:3] Wait("SIP/XXX.XXX.58.107-00000355", "2") in new stack
-- <SIP/XXX.XXX.58.107-00000350> Playing 'digits/1.ulaw' (language 'en')
-- <SIP/XXX.XXX.58.107-00000352> Playing 'digits/8.ulaw' (language 'en')
-- Executing [s@from-trunk:6] Hangup("SIP/XXX.XXX.58.107-0000034f", "") in new stack
== Spawn extension (from-trunk, s, 6) exited non-zero on 'SIP/XXX.XXX.58.107-0000034f'
-- Executing [h@from-trunk:1] Macro("SIP/XXX.XXX.58.107-0000034f", "hangupcall,") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/XXX.XXX.58.107-0000034f", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/XXX.XXX.58.107-0000034f", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] Hangup("SIP/XXX.XXX.58.107-0000034f", "") in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/XXX.XXX.58.107-0000034f' in macro 'hangupcall'
== Spawn extension (from-trunk, h, 1) exited non-zero on 'SIP/XXX.XXX.58.107-0000034f'
-- <SIP/XXX.XXX.58.107-00000351> Playing 'digits/7.ulaw' (language 'en')
-- <SIP/XXX.XXX.58.107-00000350> Playing 'digits/1.ulaw' (language 'en')
-- <SIP/XXX.XXX.58.107-00000353> Playing 'digits/0.ulaw' (language 'en')
-- <SIP/XXX.XXX.58.107-00000352> Playing 'digits/4.ulaw' (language 'en')
由于来自未知对等方的那些讨厌的连接,我无法调试我的主干,这些呼叫是什么,我如何跟踪它们的来源,它可能是我的提供商的故障测试工具吗?
即使关闭了 GUEST,您的 Asterisk 服务器仍然会受到 SIP 黑客攻击的攻击。您应该安装更多的东西来监控和管理攻击。查看Asterisk Security以获得建议,甚至是如何保护 Asterisk 服务器的基础知识。(客串还不够)
我想这一切都取决于 - 我假设您在某种 Linux 上运行 Asterisk?我已经多次这样做了,这里和那里可能有点棘手。但是 - 在调试方面,有许多工具可以提供帮助。
例如,可以使用 IPTables 阻止未知客户端。如果您知道您的呼叫应该来自哪里,您可以设置防火墙规则来阻止除此之外的任何内容。这就是我所做的——确保只有我自己的客户以及任何上游 PBX 系统才能通话。
要弄清楚未知客户端的真实身份,您可以使用Wireshark之类的工具根据类型等过滤连接。这通常可以清晰地了解正在发生的事情。
这些只是指针。您可能想详细说明一下您的设置 - 然后我可能会更具体。
好吧,我发现我允许 SIP 客人。似乎许多机器人正在寻找不安全的服务器来发送垃圾邮件或中继。
所以我只是禁用了这个选项,我的日志现在恢复到正常状态。
从内存中,这可以通过 PBX > Config File Editor > sip_general_additional.conf 在 Trixbox 服务器中禁用
添加到最后一行:
点击更新。
然后转到系统>系统维护>立即重置。
全部完成。