Skip to Content
Platform.Ontology

WebRTC STUN public IP discovery

A STUN request lets a page discover the public IP of the real network path, even behind some VPNs.

Gets silentlyNetwork and connectionWebRTCWeb browsersWhen the page loads

In one line

Can find the public internet address of your real connection, even when some VPNs hide it

A STUN request lets a page discover the public IP of the real network path, even behind some VPNs.

ICE gathering sends UDP to a STUN server and learns the server reflexive address. Proxies and browser VPN extensions that cannot proxy UDP leak the real IP. Chrome WebRTC IP handling policies and Brave default settings block this.

What it can and can't do

What the user does: Nothing. A page can start a call setup without any pop up

It can

  • Ask an outside server what your public address looks like
  • Find your real address if a VPN or proxy does not carry call traffic
  • Compare it with your claimed address to spot hiding

It cannot

  • Bypass a VPN that carries all traffic, including call traffic
  • See your address when you turn on browser protections that block it, such as in Brave or Chrome policies
  • See your name or account
  • Do this without a script running on the page

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported232012-11-06None
EdgeSupported152017-04-05None
FirefoxSupported442016-01-26None
SafariSupported112017-09-19None
Safari on iPhoneSupported112017-09-19None
Chrome on AndroidSupported252013-02-27None
Samsung InternetSupported1.52013-09-25None

How a site asks for it

APInew RTCPeerConnection({iceServers:[{urls:'stun:...'}]}); srflx candidates
Browser compat keysapi.RTCIceCandidate
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Open peer connection with a STUN server
  2. Read srflx candidate
  3. Compare with HTTP IP

Data you get

What comes back: Public IPv4 or IPv6
Shape: string

FieldTypeUnitRangePrecision
srflx addressstringNoneIPv4 or IPv6exact

Technical limits

  • Brave and Firefox (media.peerconnection.ice.default_address_only) can limit candidates
  • Chrome policy setting disable_non_proxied_udp restricts it

The story

What it is

A page can ask a helper server for your real public internet address, sometimes beating a VPN.

For you

You never see it. A page can start a hidden call setup and learn the public address your device really uses. If your VPN only covers some traffic, your real address may leak.

For makers

Makers need this step so calls and games can connect through home routers. It is also used by fraud tools to see past proxies. Privacy tools block or limit it, which can break calls.

Where you see it

TypeExampleApps
videoZoom or Google Meet in the browser asks a helper server what public address you appear to have, then shares it so the other person can reach you directly.Zoom, Google Meet
gamesA browser multiplayer game with direct player links uses it so two players behind home routers can connect, without paying for a relay.None named
securityA bank's fraud script sets up a hidden call to learn the real address behind a VPN, and flags a mismatch with the connection address.None named
adsAn ad tech script reads the real public address behind a proxy to catch click fraud from hidden networks.None named
videoA cloud gaming site uses it to pick the closest game server and the best path for the live video stream.GeForce NOW
shoppingA fraud tool at checkout compares the address from the call setup with the address on the page request. Different values raise the risk score.None named
developerA developer opens browser leak test pages to check if their VPN hides the real address during calls.BrowserLeaks

Risks

  • VPN leak
  • Used to unmask visitors

Good uses and abuse

Legitimate uses

  • Calling apps

Known abuse

  • Defeating VPN and proxy privacy

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits3Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page