stun测试

1 连接公网测试

hnan@ubuntu:~$ sudo apt-get install stun

hnan@ubuntu:~$ stun stun.stunprotocol.org -v

 


STUN client version 0.96
Opened port 24364 with fd 3
Opened port 24365 with fd 4
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Received stun message: 68 bytes
MappedAddress = 111.202.230.162:24364
SourceAddress = 52.86.10.164:3478
ChangedAddress = 52.201.75.212:3479
XorMappedAddress = 111.202.230.162:24364
Received message of type 257  id=1
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 52.201.75.212:3478
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 111.202.230.162:24364
Received stun message: 68 bytes
MappedAddress = 111.202.230.162:24364
SourceAddress = 52.86.10.164:3478
ChangedAddress = 52.201.75.212:3479
XorMappedAddress = 111.202.230.162:24364
Received message of type 257  id=1
Received stun message: 68 bytes
MappedAddress = 111.202.230.162:24364
SourceAddress = 52.201.75.212:3478
ChangedAddress = 52.86.10.164:3479
XorMappedAddress = 111.202.230.162:24364
Received message of type 257  id=10
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 111.202.230.162:24364
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 111.202.230.162:24364
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 111.202.230.162:24364
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 111.202.230.162:24364
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 111.202.230.162:24364
Encoding stun message: 
Encoding ChangeRequest: 4

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 2

About to send msg of len 28 to 52.86.10.164:3478
Encoding stun message: 
Encoding ChangeRequest: 0

About to send msg of len 28 to 111.202.230.162:24364
test I = 1
test II = 0
test III = 0
test I(2) = 1
is nat  = 1
mapped IP same = 1
hairpin = 0
preserver port = 1
Primary: Indepndent Mapping, Port Dependent Filter, preserves ports, no hairpin
Return value is 0x000017

 

2 服务器测试

stund -h 192.168.15.58 -v

转载于:https://my.oschina.net/u/208947/blog/794477

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值