n2n - a simple, lightweight and reliable alternative to Wippien, Hamachi, ZeroTier One and Radmin VPN.

n2n is a layer-two peer-to-peer virtual private network (VPN) which allows users to exploit features typical of P2P applications at network instead of application level. This means that users can gain native IP visibility (e.g. two PCs belonging to the same n2n network can ping each other) and be reachable with the same network IP address regardless of the network where they currently belong. In a nutshell, as OpenVPN moved SSL from application (e.g. used to implement the https protocol) to network protocol, n2n moves P2P from application to network level.

The main n2n design features are:
  • An n2n is an encrypted layer two private network based on a P2P protocol.
  • Encryption is performed on edge nodes using open protocols with user-defined encryption keys: you control your security without delegating it to companies as it happens with Skype or Hamachi.
  • Each n2n user can simultaneously belong to multiple networks (a.k.a. communities).
  • Ability to cross NAT and firewalls in the reverse traffic direction (i.e. from outside to inside) so that n2n nodes are reachable even if running on a private network. Firewalls no longer are an obstacle to direct communications at IP level.
  • n2n networks are not meant to be self-contained: it is possible to route traffic across n2n and non-n2n networks.

The n2n architecture is based on two components:
  • edge nodes: applications installed on user PCs that allow the n2n network to be build. Practically each edge node creates a tun/tap device that is then the entry point to the n2n network.
  • an supernode: it is used by edge nodes at startup or for reaching nodes behind symmetrical firewalls. This application is basically a directory register and a packet router for those nodes that cannot talk directly.
Official n2n's website and GitHub repository.

-

Windows installation procedure:

n2n requires the system to have a TAP adapter installed. You may download and install the TAP driver from the links below.
TAP driver for Windows 7 and 8.1.
TAP driver for Windows 10.

n2n for Windows.
After installing the TAP driver, download and copy both files linked above to Windows directory and run the following command with administrator privileges in a command prompt window:
edge -a (IP address of your choice) -c (Network name of your choice) -k (Network password of your choice; optional) -EM 1500 -l tesla.dynv6.net:10088
If you wish to automate n2n's setup, you may create a batch script or link (shortcut) file with the command above and run it with administrator privileges.
Installing n2n as a service does it too. Run a command prompt window with administrator privileges and run the following command:
sc create "n2n Edge" binpath= "edge -a (IP address of your choice) -c (Network name of your choice) -k (Network password of your choice; optional) -EM 1500 -l tesla.dynv6.net:10088" && net start "n2n Edge"

Linux installation procedure:

sudo su
wget -O - https://github.com/Krush206/n2n/releases/download/untagged-cb05c825fc7f7c2397f8/n2n_Linux_i386.tar.gz | tar -C /usr/local/bin -zxf -
edge -fa (IP address of your choice) -c (Network name of your choice) -k (Network password of your choice; optional) -EM 1500 -l tesla.dynv6.net:10088 &

FreeBSD installation procedure:

su
fetch -o - https://github.com/Krush206/n2n/releases/download/untagged-cb05c825fc7f7c2397f8/n2n_FreeBSD_i386.tar.gz | tar -C /usr/local/sbin -zxf -
edge -fa (IP address of your choice) -c (Network name of your choice) -k (Network password of your choice; optional) -EM 1500 -l tesla.dynv6.net:10088 &

Linux (armv7) installation procedure:

sudo su
wget -O - https://github.com/Krush206/n2n/releases/download/untagged-cb05c825fc7f7c2397f8/n2n_Linux_armhf_gnu.tar.gz | tar -C /usr/local/bin -zxf -
edge -fa (IP address of your choice) -c (Network name of your choice) -k (Network password of your choice; optional) -EM 1500 -l tesla.dynv6.net:10088 &

n2n for Android:

Hin2n is a port of n2n for the Android operating system. The port is actively maintaned and doesn't require superuser privileges.

Notes:

Unless you manually set and do know how netmasks work, do note the IP address must have the same segmentation. If someone uses a class C IP address set to 1.0.0.1, then all nodes which wish to have a connection to 1.0.0.1 must have the first three segments set as 1.0.0.X, where X is a free choice.

All binaries linked in the guides were produced from Meyerd's GitHub repository, a good n2n fork. If you wish to use official n2n binaries, please, clone the official n2n's GitHub repository and compile from hand.

tesla.dynv6.net:10088 is a supernode hosted on a low-cost laptop of mine, which runs on FreeBSD. If, for any reason, you experience connection issues or downtime, it may be because the machine is down and/or not currently running a n2n supernode.
If you want to switch to another supernode, consider switching to switchy.wang:10088.


If you have any questions regarding n2n, please, don't hesitate to comment.

Comments