STUN (2024)

STUN stands forSession Traversal Utilities for NAT.

It is a standard method of NAT traversal used in WebRTC. It is defined in IETF RFC 5389.

It is one of two NAT traversal servers that are used in WebRTC (the other one is TURN).

At its core, it’s purpose is to answer the question “what is my IP address?” It does that by using a STUN server.

What is a STUN server?

It is a client-server protocol.

A STUN server is a server that runs on the public network and replies to incoming requests. The responses it sends out include the public IP address the request was sent to him from. This effectively answers the question “what is my IP address?”

In most cases, the servers aren’t installed and managed as separate entities but are rather installed together with TURN servers.

While there are free public servers that can be used (such as the one Google operates), it isn’t advisable to use them in commercial services as your main NAT traversal mechanism.

Using a server

A WebRTC client has to know its public IP address in order to get more sessions connected successfully. For that purpose, WebRTC sends a request to a STUN server asking for its public IP address. The server replies back to the WebRTC client with the public IP address the request came from. This way, the WebRTC client learns what its public IP address is.

The WebRTC client then shares the public IP address it received from the server with its peer.

It might not always work. With some network architecture and NAT device types, the public IP address obtained via STUN will not work. This is why it is used in conjunction with TURN and ICE.

As a protocol, it is lightweight and simple, making the availability of public, free and open servers possible.

Free and public Session Traversal Utilities for NAT server

There are various free STUN servers available out there.

It is lightweight and carry no real authentication mechanism to it. This makes it simple for developers to connect to freeservers without any technical hurdles. It is not advisable to do so.

  • These free STUN servers might not be there for you tomorrow, and there is no one that offers support for them or even guarantees that they will be there
  • You will usually also need TURN servers and these aren’t free. Since TURN servers also double as STUN servers and you will need to deploy or pay for those, just use them for STUN as well
  • Using too many STUN and TURN servers in the iceServers list is counterproductive, often causing delays in connectivity and increasing network congestion instead of improving your chances to connect

Best practices

  • STUN doesn’t cost much to operate, which is why there are various free servers you can connect to. That said, if you are using a free or a public server (like the famous stun.l.google.com:19302 server), expect it to go down from time to time as you have no control or an SLA for it
  • It is usually deployed with TURN servers. Focus on a TURN server solution and STUN “will follow”
  • Configuring TURN/UDP implicitly also implements the STUN protocol. This means that if you use a TURN/UDP server, you can do away with explicitly stating the server in the iceServers configuration of a peer connection
STUN (2024)

FAQs

What happens if you stun someone? ›

Tasers, AKA stun guns, cause your muscles to seize up, which can make them sore for days after. Puncture wounds, cuts, and bruises are common injuries following a shock from a Taser or stun gun. In rare cases, Tasers can damage kidney function or cause testicular torsion.

How long are you stunned with a stun gun? ›

Incapacitation lasts for the duration of the discharge, which is typically 5 seconds but can be 15 seconds or longer if pressure on the trigger is maintained. The TASER X26 battery has the capacity to deliver up to 195 discharges of 5 seconds each,1 which corresponds to a duration of over 15 minutes.

What is a good strength for a stun gun? ›

What is a good stun gun voltage? 25,000 volts typically will deliver pain to your assailant. However higher voltage in the 50,000 to 100,000 volt range is better especially with clothing covering the skin.

What is the stun effect in video games? ›

Stun is a common status effect that can prevent affected characters from taking most actions, including the ability to block or tag; it is perhaps the deadliest effect in the game when fully exploited, as it leaves the affected character vulnerable to the full damage of ALL forms of attacks, such as hits with critical ...

How many times can you tase someone? ›

A person can use it repeatedly as long as they charge the battery. A taser relies on a cartridge containing darts and wires. A person can use one cartridge for a few “shots” and replace it.

How painful is getting tased? ›

While Hateley said it was “excruciating pain”, Tasering is often used on people in a heightened state of arousal who don't feel the pain as intensely. “When exposed to a person that might be [in a] rage, alcohol, drug or mentally affected, pain tolerance doesn't mean a lot to those people,” he said.

What are the after effects of a stun gun? ›

The darts leave small punctures. It's important to keep these puncture wounds clean while they heal. Stun guns may cause other medical problems such as burns and muscle problems. Your muscles may be sore for a day or two.

What happens if you shock yourself with a stun gun? ›

Lightning and stun guns also can cause electrical shocks. The shock can cause a burn where the current enters and leaves your body. The electricity may have injured blood vessels, nerves, and muscles. The electricity also could have affected your heart and lungs.

What happens if you use a stun gun on someone touching you? ›

No. If the attacker is touching you, you will not be shocked. The shock provided by the stun gun will not conduct from one person to another. The effects of the shock are localized only to where the contact is made.

Do stun guns work through clothing? ›

Most stun guns will work through light clothing, but keep in mind that heavy or bulky clothing or jackets will reduce their effectiveness.

Does a stun gun have to touch skin? ›

Does the stun gun have to contact bare skin to be effective? No, but clothing reduces the effectiveness of the stun gun. The more layers, the greater reduction. The best transfer of energy is through direct skin contact, however in a defensive situation, you have to take what you can get.

Is a stun gun more powerful than a Taser? ›

While a TASER device is just as painful as a normal stun gun, it's more effective at incapacitating muscle functions so an attacker can't move.

Why is STUN needed? ›

Main use cases of a STUN server

Establishing peer-to-peer connections: STUN servers help devices behind NAT devices to establish direct peer-to-peer connections with other devices. This is useful for applications such as video conferencing, online gaming, and file sharing.

What is STUN method? ›

STUN is a tool for communications protocols to detect and traverse network address translators that are located in the path between two endpoints of communication.

What is STUN setting? ›

STUN (Simple Traversal of UDP through NATs) is a network protocol allowing a client behind a NAT (or multiple NATs) to find out its public address, the type of NAT it is behind and the internet side port associated by the NAT with a particular local port.

What are the side effects of tasing someone? ›

The electrical currents may disrupt brain or heart function, leading to seizures, abnormal brain function and even a potentially fatal heart irregularity.

What happens if I Taser someone touching me? ›

If the attacker is touching you, you will not be shocked. The shock provided by the stun gun will not conduct from one person to another. The effects of the shock are localized only to where the contact is made.

What are the effects of being stunned by a Taser? ›

The electric shock causes muscle contractions, potentially resulting in traumatic falls, or fractures. Cardiac problems occur only in exceptional cases; risk factors include long duration of the power surge, short distance from the darts to the heart and underlying heart problems.

How long does Taser pain last? ›

Your muscles may be sore for a day or two. Follow-up care is a key part of your treatment and safety. Be sure to make and go to all appointments, and call your doctor or nurse advice line (811 in most provinces and territories) if you are having problems.

Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 5905

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.