supernode(1)

πŸ“¦
version 3.1.1 Β· 3 versions
, in alpine 3.24, arch rolling, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– supernode β€” n2n supernode daemon πŸ’–

okay bestie, sit down, grab a strawberry πŸ“, because this is the supernode page from section 1 (USER COMMANDS) of the manual and it's literally the backbone of your whole n2n setup. let's get into it πŸ’…


✨ NAME ✨

supernode β€” the n2n supernode daemon, aka the main character of your peer-to-peer VPN πŸ‘‘


✨ SYNOPSIS ✨

supernode <config file>
supernode [OPTION]...

✨ DESCRIPTION ✨

so. N2N is a peer-to-peer VPN system, right? and supernode is the node introduction registry, the broadcast conduit, and the packet relay node for the whole n2n system. the way that it works is: on startup, supernode starts listening on the specified UDP port for node registrations and other packets it needs to route. πŸ¦‹

it can service any number of communities, and it routes packets only between members of the same community. and here's the iconic part β€” the supernode does not hold the community encryption key, so it literally cannot snoop on or inject packets into the community. privacy queen behavior, no cap πŸ”₯

supernode can service a number of n2n communities concurrently. traffic does not cross between communities. ever. that's the rule πŸ“

all logging goes to stdout. periodt.

the config file is similar to the command line, with one option per line. lines starting with a # are ignored. an equal sign (=) should be used between key and value. Example: -p=7777


🌈 OPTIONS FOR THE UNDERLYING NETWORK CONNECTION 🌈

  • -p <local_port>, --local-port=<local_port> β€” listen on this fixed local UDP port. defaults to 7654 πŸŽ€
  • -F <fed_name> β€” name of the supernode's federation, defaults to '*Federation' (see also N2N_FEDERATION in ENVIRONMENT) πŸ’œ
  • -l <host:port> β€” ip address or name, and port of known supernode 🌸
  • -m <mac_address> β€” fixed MAC address for the supernode, e.g. '-m 10:20:30:40:50:60', random otherwise πŸ™ˆ
  • -M β€” disable MAC and IP address spoofing protection for all non-username-password-authenticating communities ⚠️ (yes this is exactly as spicy as it sounds, bestie)
  • -V <version_string> β€” modify the supernode version string which is distributed to the edges and shown at their management port output, up to 19 characters ⭐

🧚 TAP DEVICE AND OVERLAY NETWORK CONFIGURATION 🧚

  • -c <path>, --communities=<path> β€” file containing the allowed communities and any User / Password based authentication details (See ALLOWED COMMUNITIES FILE section) πŸ“„
  • -a <net-net/n>, --autoip=<net-net/n> β€” subnet range for auto ip address service, e.g. '-a 192.168.0.0-192.168.255.0/24', defaults to '10.128.255.0-10.255.255.0/24' 🌐

πŸ’… LOCAL OPTIONS πŸ’…

  • -f, --foreground β€” disable daemon mode (UNIX) and run in foreground. no more hiding in the background, she's out here living her truth ✨
  • -t <port>, --mgmt-port=<port> β€” management UDP port, for multiple supernodes on a machine, defaults to 5645 πŸŽ€
  • --management-password <password> β€” sets the password for access to JSON API at the management port, defaults to 'n2n'. The password has to be provided for relevant access to JSON API at the management port. πŸ” (and yes bestie, change that default, i'm begging you 😭)
  • -v, --verbose β€” use verbose logging πŸ“’
  • -u <UID> β€” numeric user ID to use when privileges are dropped 🫢
  • -g <GID> β€” numeric group ID to use when privileges are dropped 🫢
  • -h β€” shows a quick reference including all available options ⚑
  • --help β€” shows detailed parameter description πŸ“–

🌸 ALLOWED COMMUNITIES FILE 🌸

this file is a plain text file, okay? comments are introduced with a hash at the beginning of the line. a line that begins with an asterisk is a user authentication definition and adds an allowed user to the most recently defined community. allowed communities can be specified with a regular expression. πŸ€“

Example community file:

# List of allowed communities
mynetwork
netleo
* logan nHWum+r42k1qDXdIeH-WFKeylK5UyLStRzxofRNAgpG
* sister HwHpPrdMft+38tFDDiunUds6927t0+zhCMMkQdJafcC

more details on creating the allowed communities file are found in the Communities.md and Authentication.md documentation included with this package. go read them, they ate πŸ“š


🌈 ENVIRONMENT 🌈

  • N2N_FEDERATION β€” set the federation name so it is not visible at the command line 🀫

πŸ¦‹ EXAMPLES πŸ¦‹

supernode -p 7654 -v

Start supernode listening on UDP port 7654 with verbose output. πŸ’–

echo | nc -w1 -u 127.0.0.1 5645

Shows the management status of a running supernode. πŸ‘€


😭 RESTART 😭

When supernode restarts it loses all registration information from associated edge nodes. It can take up to five minutes for the edge nodes to re-register and normal traffic flow to resume.

like, five whole minutes. that's an eternity in group-chat time. plan accordingly bestie 🫠


πŸ’€ EXIT STATUS πŸ’€

supernode is a daemon and any exit is an error. if it leaves, something went wrong. no graceful goodbye, only tragedy πŸ˜”


πŸ‘‘ AUTHOR πŸ‘‘

Luca Deri ( deri (at) ntop.org ), Richard Andrews ( andrews (at) ntop.org ), Don Bindner


πŸ”₯ SEE ALSO πŸ”₯

  • ifconfig(8)
  • edge(8)
  • the documentation contained in the source code
  • the extensive documentation found in n2n's doc/ folder

and that's the whole page, bestie!! this was version 3, dated Jul 16, 2021, and honestly? iconic. go spin up that supernode, you've got this πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from