当前位置:网站首页>port forwarding
port forwarding
2022-08-10 21:35:00 【51CTO】
Port Forwarding is configured on the router (machine making nat) and will forward connections originated from external clients to internal machine running asterisk.
If using Linux/Netfilter, run, on router:
# SET SIP SERVER INTERNAL IP (LAN)
SIP_SRV_LAN_IP=192.168.0.123
# FORWARDING
iptables -t nat -A PREROUTING -p udp -m multiport --dport 5060,10000:20000 -j DNAT --to-destination $SIP_SRV_LAN_IP
# ALLOW ASTERISK CONNECTIONS/REPLIES TO OUTSIDE (INTERNET)
iptables -A FORWARD -p udp -s $SIP_SRV_LAN_IP -j ACCEPT
# ALLOW FORWARDED CONNECTIONS/REPLIES TO INSIDE (LAN)
iptables -A FORWARD -p udp -m multiport --dport 5060,10000:20000 -d $SIP_SRV_LAN_IP -j ACCEPT
The range 10000:20000 is not mandatory, but in asterisk it is the default configuration. It can be checked (and altered if necessary) in the file rtp.conf, found generally in /etc/asterisk/rtp.conf.
边栏推荐
- Likou 215 questions, the Kth largest element in an array
- LeetCode-36-Binary search tree and doubly linked list
- 流程控制结构——《mysql 从入门到内卷再到入土》
- C # Hex file transfer skills necessary article 】 【 bin file code implementation
- ENVI最小距离、最大似然、支持向量机遥感影像分类
- 【PCBA方案】电子握力测试仪方案she‘ji
- 黑猫带你学Makefile第12篇:常见Makefile问题汇总
- labelme-5.0.1版本编辑多边形闪退
- 【开源教程5】疯壳·开源编队无人机-飞控固件烧写
- An article to teach you a quick start and basic explanation of Pytest, be sure to read
猜你喜欢
管理员必须知道的RADIUS认证服务器的部署成本
Alibaba and Ant Group launched OceanBase 4.0, a distributed database, with single-machine deployment performance exceeding MySQL
APP UI自动化测试常见面试题,或许有用呢~
Translating scientific and technological papers, how to translate from Russian to Chinese
Black cats take you learn Makefile article 13: a Makefile collection compile problem
接口测试的概念、目的、流程、测试方法有哪些?
【Maui正式版】创建可跨平台的Maui程序,以及有关依赖注入、MVVM双向绑定的实现和演示
[Maui official version] Create a cross-platform Maui program, as well as the implementation and demonstration of dependency injection and MVVM two-way binding
C#【必备技能篇】Hex文件转bin文件的代码实现
shell(文本打印工具awk)
随机推荐
关于 DataFrame: 处理时间
VLAN huawei 三种模式
Service - DNS forward and reverse domain name resolution service
xshell (sed 命令)
web逆向之丁香园
MySQL Advanced Commands
Intelligent scheme design - intelligent rope skipping scheme
ACM模板笔记:最长不下降/上升子序列
Likou 221 questions, the largest square
华为路由器旁挂引流实验(使用流策略)
财务年报怎样翻译,为什么要选择专业翻译公司?
String类的常用方法
DELETE:删除操作语法&使用例——《mysql 从入门到内卷再到入土》
着力提升制造业核心竞争力,仪器仪表产业迎高质量发展
接口测试的概念、目的、流程、测试方法有哪些?
使用SylixOS虚拟串口,实现系统串口自由
Translating scientific and technological papers, how to translate from Russian to Chinese
Redis Performance Impact - Asynchronous Mechanisms and Response Latency
Regular expression of shell programming and text processor
ThreadLocal comprehensive analysis (1)