当前位置:网站首页>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.
边栏推荐
- 基于Pix4Dmapper的空间三维模型重建应用——空间分析选址
- 使用 Cloudreve 搭建私有云盘
- UPDATE:修改数据语法使用例——《mysql 从入门到内卷再到入土》
- 自建函数 测试例和语法——《mysql 从入门到内卷再到入土》
- RADIUS Authentication Server Deployment Costs That Administrators Must Know
- ACM模板笔记:最长不下降/上升子序列
- shell (text printing tool awk)
- ACM解题笔记——HDU 1401 Solitaire(DBFS)
- Interpretation of the paper (g-U-Nets) "Graph U-Nets"
- LeetCode每日一题(1573. Number of Ways to Split a String)
猜你喜欢
【SQL刷题】Day3----SQL必会的常用函数专项练习
HighTec shortcut keys (Keys) setting location
Using SylixOS virtual serial port, serial port free implementation system
[SQL brush questions] Day3----Special exercises for common functions that SQL must know
【PCBA方案设计】蓝牙跳绳方案
String类的常用方法
Huawei router clock near the drainage experiment (using stream strategy)
字节跳动原来这么容易就能进去...
ACM解题笔记——HDU 1401 Solitaire(DBFS)
ThreadLocal全面解析(一)
随机推荐
如何保护 LDAP 目录服务中的用户安全?
基于Pix4Dmapper的空间三维模型重建应用——空间分析选址
DDL:ALTER 修改数据库——《mysql 从入门到内卷再到入土》
Intelligent scheme design - intelligent rope skipping scheme
GMT,UTC,CST,DST,RTC,NTP,SNTP,NITZ: 嵌入式的时间
【PCBA方案】电子握力测试仪方案she‘ji
力扣215题,数组中的第K个最大元素
xshell (sed command)
2022.8.9 Mock Competition
shell编程之免交互
【PCBA scheme design】Bluetooth skipping scheme
智能方案设计——智能跳绳方案
String类的常用方法
黑猫带你学Makefile第13篇:Makefile编译问题合集
Likou 221 questions, the largest square
基于Pix4Dmapper的运动结构恢复法无人机影像三维模型重建
LeetCode-36-二叉搜索树与双向链表
Translating scientific and technological papers, how to translate from Russian to Chinese
翻译科技论文,俄译中怎样效果好
服务——DNS正向反向域名解析服务