LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

stun

Test NAT traversal and external addressing

TLDR

Test NAT type
$ stun [stun.example.com]
copy
Use specific port
$ stun -p [3478] [stun.example.com]
copy
Verbose output
$ stun -v [stun.example.com]
copy
Local port binding
$ stun -L [54321] [stun.example.com]
copy

SYNOPSIS

stun [-p port] [-L localport] [-v] server

DESCRIPTION

stun is a STUN (Session Traversal Utilities for NAT) client that queries STUN servers to determine NAT type and discover external addressing information. It sends binding requests to a STUN server and analyzes the responses to classify the NAT behavior of the network the client is behind.The tool can identify various NAT types including full cone, restricted cone, port-restricted cone, and symmetric NAT. It also reports the external IP address and port mapping as seen by the STUN server, which is essential information for peer-to-peer connectivity.This is useful for troubleshooting VoIP and SIP connectivity issues, diagnosing WebRTC connection failures, and understanding network topology. The NAT type directly affects whether peer-to-peer connections can be established, with symmetric NAT being the most restrictive.

PARAMETERS

-p PORT

Server port.
-L PORT
Local port.
-v
Verbose mode.
-t
TCP mode.
-h
Show help.

INSTALL

sudo apt install stun-client
copy
sudo dnf install stun
copy
nix profile install nixpkgs#stun
copy

CAVEATS

STUN server required. Network dependent. UDP by default.

HISTORY

stun is a STUN (Session Traversal Utilities for NAT) client for testing NAT behavior and discovering external addresses.

SEE ALSO

pystun3(1), nmap(1), netcat(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid