stunc(1)
π stunc β the STUN test client, bestie edition π
okay so first things first, this is stunc from the sofia-sip-utils crew, and she's a STUN test client. that's the whole vibe. but like, who made her? let's give credit where credit is due π«Ά
- Author: Pekka Pessi
<Pekka.Pessi@nokia.com>, Martti Mela<Martti.Mela@nokia.com>, Kai Vehmanen<Kai.Vehmanen@nokia.com> - Date: Created:
Thu Jul 24 17:21:00 2003 ppessi
β¨ SYNOPSIS β¨
stunc [OPTIONS] <stun-server-address>
πΈ DESCRIPTION πΈ
so stunc is literally the girl you call when you wanna snoop on the NAT devices chilling between you and your STUN server. she gathers all the info. it's giving detective energy π
here's the tea she can serve you: the IP address and port as seen by the STUN server, detecting the presence of NATs, and hints on the type of address translation being done. slay.
β οΈ bestie, listen β the results of NAT type and life-time detection should be considered hints. there is no guarantee that NAT(s) will handle future packets in the same way. so don't come for her if the network switches up on you, okay? π
π COMMAND LINE OPTIONS π
the stunc utility accepts the following command line options, and yes we're going through every single one:
-bβ perform a STUN binding discovery.stuncwill report the client transport address (IP:port) as seen by the STUN server. when NATs are in the picture, this address is allocated by the NAT closest to the STUN server. iconic behavior honestly.-lβ perform a STUN binding life-time check.-nβ perform a STUN binding type check. and like, heads up: the results are only hints. nondeterministic behaviour, resource exhaustion, or reboots of network elements can cause changes in NAT behaviour between successive runs ofstunc. so run it twice and get different answers? not a bug, that's just the network being messy π-rβ randomize the local port. otherwisestunclets the operating system select a free port. (letting the OS pick is lowkey fine too, but go off π)-sβ request a shared-secret over TLS. tests whether the STUN server supports the shared-secret mechanism (needed to protect message integrity). can be combined with-b,-land-n. the way she multi-tasks?? obsessed. π
π₯ RETURN CODES π₯
0β when successful β¨1β when any errors detected π
π EXAMPLES π
discover the NAT binding, use a random local port:
$ stunc stunserver.org -b -r
that's it. that's the whole flex. main character energy fr fr π
π¦ ENVIRONMENT π¦
#STUN_DEBUG
π REPORTING BUGS π
found something cursed? report bugs to sofia-sip-devel@lists.sourceforge.net. she wants to know, bestie π«Ά
π AUTHORS π
- Pekka Pessi
<pekka -dot pessi -at- nokia -dot- com> - Martti Mela
<martti -dot mela -at- nokia -dot- com> - Kai Vehmanen
<kai -dot vehmanen -at- nokia -dot- com>
π COPYRIGHT π
Copyright (C) 2005,2006 Nokia Corporation.
This program is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and that's the whole page babes π brought to you by sofia-sip-utils, Version 1.12.11devel, from the stunc(1) manual β mwah, go discover some NATs, periodt. π
β¨πΈ
π¦ where this page comes from
- ubuntu noble: sofia-sip-bin 1.12.11+20110422.1+1e14eea~dfsg-6.1build2 Β· LGPL-2.1-or-later
- ubuntu questing: sofia-sip-bin 1.12.11+20110422.1+1e14eea~dfsg-6.1build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms