STUN (Session Traversal Utilities for NAT) is a protocol that helps to establish communication between two devices that are located behind different NAT (Network Address Translation) devices. NAT is used to allow multiple devices to share a single public IP address. However, this can make it difficult for devices behind NAT devices to communicate with each other.
STUN provides a way for devices to discover their public IP address and port. This information can then be used to establish a connection between the two devices. STUN is used in a variety of applications, including: