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/stunserver-1.2.3.tgz

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 查看 參數說明!

文檔:http://zengqf.gitee.io/ifreeswitchgui/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章