N2N is a peer-to-peer VPN system. Edge is the edge node daemon for n2n which
creates a TAP interface to expose the n2n virtual LAN. On startup n2n creates
the TAP interface and configures it then registers with the supernode so it can
begin to find other nodes in the community.
sets the TAP device name as seen in ifconfig.
sets the n2n virtual LAN IP address being claimed. This is a private IP
address. All IP addresses in an n2n community should belong to the same /24
network (ie. only the last segment of the IP addresses varies).
cause edge to perform hostname resolution for the supernode address each time
the supernode is periodically contacted.
sets the n2n community name. All edges within the same community look to be on
the same LAN (layer 2 network segment). All edges communicating must use the
same key and community name.
write usage to tty then exit.
sets the twofish encryption key from ASCII text (see also N2N_KEY in
ENVIRONMENT). All edges communicating must use the same key and community name.
sets the n2n supernode IP address and port to register to.
binds edge to the given UDP port. Useful for keeping the same external socket
across restarts of edge.
causes the edge process to drop to the given user ID when privileges are no
causes the edge process to drop to the given group ID when privileges are no
causes the edge process to fork and run as a daemon, closing stdin, stdout,
stderr and becoming a process group leader.
start the TAP interface with the given MAC address. This is highly recommended
as it means the same address will be used if edge stops and restarts. If this is
not done, the ARP caches of all peers will be wrong and packets will not flow to
this edge until the next ARP refresh.
set the MTU of the edge interface in bytes. MTU is the largest packet fragment
size allowed to be moved throught the interface. The default is 1400.
set the netmask of edge interface in IPv4 dotted decimal notation. The default
is 255.255.255.0 (ie. /24).
use HTTP tunneling instead of the normal UDP mechanism (experimental).
enable packet forwarding/routing through the n2n virtual LAN. Without this
option, packets arriving over n2n which are not for the -a <addr> IP address are
use verbose logging.
set the encryption key so it is not visible on the command line
Start edge with TAP device n2n0 on community "mynetwork" with community
supernode at 126.96.36.199 UDP port 7654 and bind the locally used UDP port to
50001. Use "encryptme" as the shared encryption key. Assign MAC address
DE:AD:BE:EF:01:23 to the n2n interface and drop to user=99 and group=99 after
the TAP device is successfull configured.
Add the -f option to make edge run as a daemon.
Somewhere else setup another edge with similar parameters, eg.