NAT穿透服务器 STUN Server 的安装使用
文章目录
我们用SIP 客户端呼叫的时候,经常遇到复杂的网络NAT环境,这个时候需要我们安装STUN Server / Turn Server 做穿透用。
这里简单记录下 STUN Server的安装启动步骤:
yum -y install gcc
yum -y install make
yum -y install boost* # For Boost
yum -y install openssl* # For OpenSSL
wget http://www.stunprotocol.org/s...
tar zxvf stunserver-1.2.3.tgz
cd stunserver
make
# 检查环境 是否OK
./stuntestcode
nohup /usr/local/stunserver/stunserver --mode basic --primaryinterface 172.31.78.132 &
nohup ./stunserver --mode full --primaryinterface eth0 --altinterface eth0 &
全功能模式 需要2个IP
./stunserver --mode full --primaryinterface 47.52.229.136 --altinterface 172.31.78.132
nohup ./stunserver --mode basic --primaryinterface 172.31.78.132
基本模式 1个IP
./stunserver --mode basic --primaryinterface 47.52.229.136 --altinterface 172.31.78.132
./stunserver --help 查看 参数说明!

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论