freeswitch需要开放哪些端口?

发布于 2024-09-15 20:09:32 字数 202 浏览 7 评论 0原文

我在 CentOS 5.5 上安装了 FreeSWITCH 1.0.6。我相信 CentOS 正在阻止 FreeSWITCH 与我的远程电话联系所需的端口,但我不知道如何在 Linux 中使用 ipTables 或需要打开哪些端口。有人可以帮忙吗?

对于 Asterisk,sip 的端口是 5060 - 5090,还有其他一些端口,但我不记得了。

谢谢你!

I have installed FreeSWITCH 1.0.6 on CentOS 5.5. I believe CentOS is blocking the ports FreeSWITCH needs in order to contact with my remote phones, but I have no idea how to use ipTables in Linux or what ports need to be open. Can anyone help?

With Asterisk the ports were 5060 - 5090 for sip and a few others but I don't remember them.

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

诗酒趁年少 2024-09-22 20:09:32

接受的答案是一个糟糕的答案... FreeSWITCH 不使用所有这些端口,并且并非所有端口都在那里定义。对于那些需要指南(使用默认配置)的人:

3478 - STUN Discovery (UDP)
3479 - STUN Discovery (UDP)
5060 - Sofia Internal Profile (TCP & UDP)
5080 - Sofia External Profile (TCP & UDP)
8021 - Event Socket (TCP)
16384-32768 - RTP Ports (UDP)

端口使用情况可能会随着模块使用情况而变化。您可以在 http://confluence.freeswitch.org 上找到该条目,以及有关以下内容的更多(最新)信息:端口使用情况可以在 https://freeswitch.org/confluence/display/FREESWITCH/Firewall

The accepted answer is a bad answer... FreeSWITCH does not use all these ports, and not all port are defined there. For those needing a guideline (using default configs):

3478 - STUN Discovery (UDP)
3479 - STUN Discovery (UDP)
5060 - Sofia Internal Profile (TCP & UDP)
5080 - Sofia External Profile (TCP & UDP)
8021 - Event Socket (TCP)
16384-32768 - RTP Ports (UDP)

Port usage is subject to change with module usage. You can find the entry on http://confluence.freeswitch.org, and more (up to date) information about port usage can be found at https://freeswitch.org/confluence/display/FREESWITCH/Firewall

心碎的声音 2024-09-22 20:09:32

最好的参考似乎是:
http://wiki.freeswitch.org/wiki/Firewall

所有端口都取决于您的模块使用情况(即,如果您使用 Web api,则为 8080)。请记住,提到的所有端口都是默认端口并且是可配置的。

Best reference seems to be :
http://wiki.freeswitch.org/wiki/Firewall

All of the ports are dependent on your module usage (ie. 8080 if you are using the web api). Keep in mind that all of the ports mentioned are defaults and are configurable.

空宴 2024-09-22 20:09:32

我无法将 FreeSWITCH wiki 与我的设置的端口相匹配,最后我使用了我的机器报告的实际开放端口,运行以下命令来找出 FreeSWITCH 在您的设备上使用的内容:

root@tardis:~# netstat -lntp | grep freeswitch
tcp        0      0 192.0.1.2:2856          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:5066          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:8081          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:8082          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:7443          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:5080          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:5060          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:2855          0.0.0.0:*               LISTEN      7220/freeswitch
tcp6       0      0 ::1:8081                :::*                    LISTEN      7220/freeswitch
tcp6       0      0 ::1:8082                :::*                    LISTEN      7220/freeswitch
tcp6       0      0 :::8021                 :::*                    LISTEN      7220/freeswitch
tcp6       0      0 ::1:5080                :::*                    LISTEN      7220/freeswitch
tcp6       0      0 ::1:5060                :::*                    LISTEN      7220/freeswitch

I could not match FreeSWITCH wiki to ports to my setup, in the end I went with what actual open ports were reported by my machine, run the following to find out what FreeSWITCH is using on your rig:

root@tardis:~# netstat -lntp | grep freeswitch
tcp        0      0 192.0.1.2:2856          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:5066          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:8081          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:8082          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:7443          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:5080          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:5060          0.0.0.0:*               LISTEN      7220/freeswitch
tcp        0      0 192.0.1.2:2855          0.0.0.0:*               LISTEN      7220/freeswitch
tcp6       0      0 ::1:8081                :::*                    LISTEN      7220/freeswitch
tcp6       0      0 ::1:8082                :::*                    LISTEN      7220/freeswitch
tcp6       0      0 :::8021                 :::*                    LISTEN      7220/freeswitch
tcp6       0      0 ::1:5080                :::*                    LISTEN      7220/freeswitch
tcp6       0      0 ::1:5060                :::*                    LISTEN      7220/freeswitch
梦年海沫深 2024-09-22 20:09:32

没关系,笨蛋,我自己弄清楚了:

-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 37 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 37 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8021 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 8021 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -p icmp -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5532 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5564 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

Nevermind chumps, I figured it out myself:

-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 37 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 37 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8021 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 8021 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -p icmp -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5532 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5564 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文