All Projects → ntop → N2n

ntop / N2n

Licence: gpl-3.0
Peer-to-peer VPN

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
Roff
2310 projects
Makefile
30231 projects
lua
6591 projects
shell
77523 projects

Projects that are alternatives of or similar to N2n

husarnet
Husarnet is a Peer-to-Peer VPN to connect your laptops, servers and microcontrollers over the Internet with zero configuration.
Stars: ✭ 128 (-96.26%)
Mutual labels:  peer-to-peer, vpn
addon-zerotier
ZeroTier One - Home Assistant Community Add-ons
Stars: ✭ 103 (-96.99%)
Mutual labels:  peer-to-peer, vpn
Libzt
ZeroTier Sockets - Put a network stack in your app
Stars: ✭ 486 (-85.81%)
Mutual labels:  vpn, peer-to-peer
gon2n
Go bindings, management daemons and CLIs for n2n edges and supernodes.
Stars: ✭ 67 (-98.04%)
Mutual labels:  peer-to-peer, vpn
wirelink
Experimental P2P configuration plane for Wireguard
Stars: ✭ 16 (-99.53%)
Mutual labels:  peer-to-peer, vpn
Wirehub
🌍 Decentralized, peer-to-peer and secure overlay networks
Stars: ✭ 459 (-86.59%)
Mutual labels:  vpn, peer-to-peer
Zerotierone
A Smart Ethernet Switch for Earth
Stars: ✭ 7,839 (+128.94%)
Mutual labels:  vpn, peer-to-peer
Crdt Playground
Stars: ✭ 215 (-93.72%)
Mutual labels:  peer-to-peer
Sentinel
Sentinel is an interoperable secure network layer offering the Sentinel Service Chain exclusively for distributed & decentralized native services like - dVPN, Sentrix (dChat and dVoIP) and more.
Stars: ✭ 228 (-93.34%)
Mutual labels:  peer-to-peer
Django Netjsonconfig
Configuration manager for embedded devices, implemented as a reusable django-app
Stars: ✭ 213 (-93.78%)
Mutual labels:  vpn
Drago
A flexible configuration manager for Wireguard networks
Stars: ✭ 204 (-94.04%)
Mutual labels:  vpn
Redwood
A highly-configurable, distributed, realtime database that manages a state tree shared among many peers.
Stars: ✭ 218 (-93.63%)
Mutual labels:  peer-to-peer
Openvpn Easy Setup
Bash script for easy and fast OpenVPN deploy
Stars: ✭ 230 (-93.28%)
Mutual labels:  vpn
Pomerium
Pomerium is an identity-aware access proxy.
Stars: ✭ 2,860 (-16.47%)
Mutual labels:  vpn
Rdbox
RDBOX is an advanced IT platform for robotics and IoT developers that highly integrates cloud-native and edge computing technologies.
Stars: ✭ 246 (-92.82%)
Mutual labels:  vpn
Ss Net
共享shadowsocks主机
Stars: ✭ 209 (-93.9%)
Mutual labels:  vpn
Kytan
kytan: High Performance Peer-to-Peer VPN in Rust
Stars: ✭ 242 (-92.93%)
Mutual labels:  vpn
Freedom
一个小白对于科学上网的一些切身感受的整理,自己捋思路,同时也为方便他人。发现错误的地方欢迎斧正。顺便也会不断整理一些实用资源及工具。
Stars: ✭ 236 (-93.11%)
Mutual labels:  vpn
Gnb
GNB is open source de-centralized VPN to achieve layer3 network via p2p with the ultimate capability of NAT Traversal.GNB是一个开源的去中心化的具有极致内网穿透能力的通过P2P进行三层网络交换的VPN。
Stars: ✭ 225 (-93.43%)
Mutual labels:  vpn
Otunnel
peer-to-peer tunnel tool
Stars: ✭ 224 (-93.46%)
Mutual labels:  peer-to-peer

Build Status

n2n

n2n is a light VPN software which makes it easy to create virtual networks bypassing intermediate firewalls.

In order to start using n2n, two elements are required:

  • A supernode: it allows edge nodes to announce and discover other nodes. It must have a port publicly accessible on internet.
  • edge nodes: the nodes which will be a part of the virtual networks

A virtual network shared between multiple edge nodes in n2n is called a community. A single supernode can relay multiple communities and a single computer can be part of multiple communities at the same time. An encryption key can be used by the edge nodes to encrypt the packets within their community.

n2n tries to establish a direct peer-to-peer connection via udp between the edge nodes when possible. When this is not possible (usually due to special NAT devices), the supernode is also used to relay the packets.

Quick Setup

Some Linux distributions already provide n2n as a package so a simple sudo apt install n2n will do the work. Alternatively, up-to-date packages for most distributions are available on ntop repositories.

On host1 run:

$ sudo edge -c mynetwork -k mysecretpass -a 192.168.100.1 -f -l supernode.ntop.org:7777

On host2 run:

$ sudo edge -c mynetwork -k mysecretpass -a 192.168.100.2 -f -l supernode.ntop.org:7777

Now the two hosts can ping each other.

IMPORTANT It is strongly advised to choose a custom community name (-c) and a secret encryption key (-k) in order to prevent other users from connecting to your computer. For the privacy of your data sent and to reduce the server load of supernode.ntop.org, it is also suggested to set up a custom supernode as explained below.

Setting up a Custom Supernode

You can create your own infrastructure by setting up a supernode on a public server (e.g. a VPS). You just need to open a single port (1234 in the example below) on your firewall (usually iptables).

  1. Install the n2n package
  2. Edit /etc/n2n/supernode.conf and add the following:
    -p=1234
    
  3. Start the supernode service with sudo systemctl start supernode
  4. Optionally enable supernode start on boot: sudo systemctl enable supernode

Now the supernode service should be up and running on port 1234. On your edge nodes you can now specify -l your_supernode_ip:1234 to use it. All the edge nodes must use the same supernode.

Manual Compilation

On Linux, compilation from source is straight forward:

./autogen.sh
./configure
make

# optionally install
make install

Some parts of the code significantly benefit from compiler optimizations and platform features such as NEON, SSE and AVX. To enable, use ./configure CFLAGS="-O3 -march=native" for configuration instead of ./configure.

For Windows, MacOS and general building options, please check out Building documentation for compilation and running.

IMPORTANT It is generally recommended to use the latest stable release. Please note that the current dev branch usually is not guaranteed to be backward compatible neither with the latest stable release nor with previous dev states. On the other hand, if you dare to try bleeding edge features, you are encouraged to compile from dev – just keep track of sometimes rapidly occuring changes. Feedback in the Issues section is appreciated.

Security Considerations

When payload encryption is enabled (provide a key using -k), the supernode will not be able to decrypt the traffic exchanged between two edge nodes but it will know that edge A is talking with edge B.

The choice of encryption schemes that can be applied to payload has recently been enhanced. Please have a look at Crypto description for a quick comparison chart to help make a choice. n2n edge nodes use AES encryption by default. Other ciphers can be chosen using the -A_ option.

A benchmark of the encryption methods is available when compiled from source with tools/n2n-benchmark.

The header which contains some metadata like the virtual MAC address of the edge nodes, their IP address, their real hostname and the community name optionally can be encrypted applying -H on the edges.

Advanced Configuration

More information about communities, support for multiple supernodes, routing, traffic restrictions and on how to run an edge as a service is available in the more detailed documentation.

Contribution

You can contribute to n2n in various ways:

  • Update an open issue or create a new one with detailed information
  • Propose new features
  • Improve the documentation
  • Provide pull requests with enhancements

For details about the internals of n2n check out the Hacking guide.

Further Readings and Related Projects

Answers to frequently asked questions can be found in our FAQ document.

Here is a list of third-party projects connected to this repository:

  • Collection of pre-built binaries for Windows: lucktu
  • n2n for Android: hin2n
  • Docker images: Docker Hub
  • Go bindings, management daemons and CLIs for n2n edges and supernodes, Docker, Kubernetes & Helm Charts: pojntfx/gon2n

(C) 2007-21 - ntop.org and contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].