当前位置:网站首页>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.
边栏推荐
- 字节跳动原来这么容易就能进去...
- DDL:ALTER 修改数据库——《mysql 从入门到内卷再到入土》
- 阿里巴巴、蚂蚁集团推出分布式数据库 OceanBase 4.0,单机部署性能超 MySQL
- [Maui official version] Create a cross-platform Maui program, as well as the implementation and demonstration of dependency injection and MVVM two-way binding
- shell编程之正则表达式与文本处理器
- Regular expression of shell programming and text processor
- LeetCode-36-二叉搜索树与双向链表
- shell编程之免交互
- 财务年报怎样翻译,为什么要选择专业翻译公司?
- ENVI最小距离、最大似然、支持向量机遥感影像分类
猜你喜欢
随机推荐
着力提升制造业核心竞争力,仪器仪表产业迎高质量发展
xshell (sed command)
异常的了解
一篇文章教你Pytest快速入门和基础讲解,一定要看
camera预览流程 --- 从HAL到OEM
Intelligent scheme design - intelligent rope skipping scheme
Object.assign用法 以及 与$.extend的区别
ENVI自动生成地面控制点实现栅格影像的自动地理配准
APP UI自动化测试常见面试题,或许有用呢~
labelme-屏蔽拖拽的事件
基于Pix4Dmapper的空间三维模型重建应用——空间分析选址
玩转doxygen 之RT-THREAD
GMT,UTC,CST,DST,RTC,NTP,SNTP,NITZ: 嵌入式的时间
什么是Jmeter?Jmeter使用的原理步骤是什么?
C # Hex file transfer skills necessary article 】 【 bin file code implementation
LeetCode-498 - Diagonal Traversal
Web Reverse Lilac Garden
从斐波那契 - 谈及动态规划 - 优化
LeetCode每日一题(1573. Number of Ways to Split a String)
Black cats take you learn Makefile article 13: a Makefile collection compile problem