防火墙中应该允许哪些端口使用 TURN 服务器? [英] Which ports should be allowed in firewall to use TURN server?

查看:66
本文介绍了防火墙中应该允许哪些端口使用 TURN 服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我们公司的服务器上设置一个轮流服务器(coturn).而且我不确定外部访问应该允许哪些端口.8443 是必须的,使用 WebRTC.3478 是凭证使用的必要条件.但是TURN服务器使用的端口数不胜数,是否需要在防火墙中允许它们?或者应该允许哪些端口使用CoTURN没有问题?

I want to set up a turn server (coturn) on our company's servers. And I'm not sure which ports should be allowed by outside access. 8443 is a must, using WebRTC. 3478 is a must for credential use. But there's these gazillions of ports which TURN server uses, do they need to be allowed in firewall?Or which ports should be allowed to use CoTURN without problem?

推荐答案

我认为这取决于您要使用的传输协议和安全级别.

I think it depends on the transport protocols you want to use and the level of security.

使用 Coturn coturn(git):

With Coturn coturn(git):

发送(或监听)STUN/TURN 请求的默认端口是 3478.

The default port for sending (or listening to) STUN/TURN requests is 3478.

UDP 和 TCP 侦听器的 TURN 侦听器端口(默认值:3478).笔记:实际上,TLS &DTLS 会话可以连接到普通"会话.TCP &UDP端口也一样 - 如果配置允许.例如,默认侦听端口可以设置为 80 或 443,以绕过一些严格的 NAT.请记住端口 <1024 可能需要超级用户权限才能启动Turnserver 进程.

TURN listener port for UDP and TCP listeners (Default: 3478). Note: actually, TLS & DTLS sessions can connect to the "plain" TCP & UDP port(s), too - if allowed by configuration. For example, the default listening port can be set to 80 or 443, to go around some strict NATs. Remember that ports < 1024 may require superuser privileges to start the turnserver process.

在我的项目中,我也使用了 tls 侦听端口,但可能没有必要:

In my project I used also tls listening port but probably it is not necessary:

通过 TLS 发送(或侦听)STUN/TURN 的默认端口是 5349.

The default port for sending (or listening to) STUN/TURN over TLS is 5349.

TLS 和 DTLS 侦听器的 TURN 侦听器端口(默认值:5349).注意:实际上,普通"TCP &UDP 会话可以连接到 TLS &DTLS 端口,也是 - 如果配置允许.例如,默认的 tls 侦听端口可以设置为 443,以绕过一些严格的 NAT.请记住端口 <1024 可能需要超级用户权限才能启动 turnserver 进程.对于安全的 TCP 连接,我们目前支持 SSL 版本 3 和 TLS 版本 1.0、1.1、1.2.为了安全的 UDP 连接,我们支持 DTLS 版本 1.

TURN listener port for TLS and DTLS listeners (Default: 5349). Note: actually, "plain" TCP & UDP sessions can connect to the TLS & DTLS port(s), too - if allowed by configuration. For example, the default tls listening port can be set to 443, to go around some strict NATs. Remember that ports < 1024 may require superuser privileges to start the turnserver process. For secure TCP connections, we currently support SSL version 3 and TLS versions 1.0, 1.1, 1.2. For secure UDP connections, we support DTLS version 1.

此外,用于建立最后的 p2p 连接:

Also, for establishing at last p2p connection :

每个客户端将通过 UDP 将数据发送到另一个端点:如果它发送到 TURN 服务器(到中继候选),它将发送到 49152-65535 之间的端口(如果它直接发送到另一方,它将发送到 0-65535 范围内的任何端口)

Each client will send the data through UDP to the other endpoint: if it’s sending to a TURN server (to a relay candidate) it will send to a port between 49152-65535 (if it’s sending directly to the other party it will send to any port in the 0-65535 range)

--min-port 中继端点分配的 UDP 端口范围的下限.根据 RFC 5766,默认值为 49152.

--min-port Lower bound of the UDP port range for relay endpoints allocation. Default value is 49152, according to RFC 5766.

--max-port 用于中继端点分配的 UDP 端口范围的上限.根据 RFC 5766,默认值为 65535.

--max-port Upper bound of the UDP port range for relay endpoints allocation. Default value is 65535, according to RFC 5766.

这篇关于防火墙中应该允许哪些端口使用 TURN 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆