Detect the NAT type of your own network under Linux system

Because symmetric NAT is very unfavorable for P2P transmission, sometimes you need to know the NAT type of your own network. To detect the NAT type of the network under a Linux system, you need to use the stun tool.

First you need to install stun software

sudo apt install stun-client

For centos, it doesn’t seem to be in yum, so you have to download it yourself.

Here are 5 server addresses that can test NAT types:

stun.stunprotocol.org
stun.sipgate.net
stun.ekiga.net
stun.voipbuster.com
stun.voxgratia.org

Execute instructions

Mainly look at Primary, the results are as follows:

Independent Mapping, Independent Filter = Full Taper NAT 
Independent Mapping, Address Dependent Filter = Restricted Taper NAT 
Independent Mapping, Port Dependent Filter = Port Restricted Taper NAT 
Dependent Mapping = Symmetrical

Guess you like

Origin blog.csdn.net/herbertyellow/article/details/131229594