$ sudo apt-get install subversion build-essential libssl-dev $ svn co https://svn.ntop.org/svn/ntop/trunk/n2n $ cd n2n/n2n_v2 $ make $ sudo make install install n2n on a Red Hat-based system:$ sudo yum install subversion gcc-c++ openssl-devel $ svn co https://svn.ntop.org/svn/ntop/trunk/n2n $ cd n2n/n2n_v2 $ make $ sudo make install Configure a P2P VPN with n2n
As mentioned earlier, we need at least one supernode, which will act as an initial boot server. We assume that the IP address of this supernode is 1.1.1.1. SuperNode:
Run the following command on a computer that acts as a supernode. Where “-l <port>” specifies the listening port of the supernode. Running roots does not require root privileges.$ supernode -l 5000 Edge node:
On each edge node, use the following command to connect to a P2P VPN. The edge daemon will run in the background. Edge node #1:$ sudo edge -d edge0 -a 10.0.0.10 -c mynetwork -u 1000 -g 1000 -k password -l 1.1.1.1:5000 -m ae:e0:4f:e7:47: 5b edge node #2:$ sudo edge -d edge0 -a 10.0.0.11 -c mynetwork -u 1000 -g 1000 -k password -l 1.1.1.1:5000 -m ae:e0:4f:e7:47 :5c Below is some explanation of the command line: The “-d <interface name>” option specifies the name of the TAP interface created by the edge command. The “-a <IP address>” option (statically) specifies the IP address of the VPN assigned to the TAP interface. If you want to use DHCP, you need to configure a DHCP server on one of the edge nodes and then use the “-a dhcp:0.0.0.0” option instead. The “-c <group name>” option specifies the name of the VPN group (maximum length is 16 bytes). This option can be used to create multiple VPNs in the same set of nodes. The “-u” and “-g” options are used to drop the root privilege after creating a TAP interface. The edge daemon will run as the specified user/group ID. The “-k <key>” option specifies a key that is encrypted by twofish. If you want to hide the key from the command line, you can use the N2N_KEY environment variable. The “-l <IP address:port>” option specifies the listening IP address and port number of the supernode. For redundancy, you can specify up to two different supernodes (such as -l <supernode A> -l <supernode B>). “-m ” Assign a static MAC address to the TAP interface. Without this parameter, the edge command will randomly generate a MAC address. In fact, it is highly recommended to force a static MAC address for a VPN interface. Otherwise, for example, when you restart the edge daemon on one node, the ARP caches of other nodes will be contaminated by the newly generated MAC address, they will not be able to send data to this node until the contaminated ARP record Was eliminated.
At this point, you should be able to ping another edge node from one edge node with a VPN IP address.
TroubleshootingThe following error was encountered while calling the edge daemon.
n2n[4405]: ERROR: ioctl() [Operation not permitted][-1]
Note The edge daemon requires superuser privileges to create a TAP interface. So you need to make sure to execute with root privileges or set the SUID for the edge command. You can then use the “-u” and “-g” options to deny the root privilege.
Summaryn2n can be a free VPN solution that is very useful for you. You can easily configure a supernode, whether it's using your own home network or a publicly accessible VPS instance from a cloud hosting provider. You no longer need to put sensitive credentials and keys in the hands of third-party VPN providers. With n2n, you can configure your own low-latency, high-bandwidth, scalable P2P VPN among your friends.
Some users of Linux systems often encounter, showing that the disk space is full, you have to delete
1, need to upload or download, you need to use the rz and sz commands. If you do not have th
How Linux extends the XFS file system. There is extra space on the disk, so I want to extend the exi
Ubuntu under the bower report EACCES: permissiondenied solution
Linux folder file creation, deletion
Vi editor paste copy cut function under Linux
Bluemix virtual machine Docker runs container
Firewall-cmd command in CentOS 7
Linux network card configuration detailed
How to delete the shadow part of the PNG picture in the pure version of win7?
Win10 shared wifi how to close win10 shared wifi off tutorial
7 reasons why users choose Windows 7
Bootcamp installation Windows XP patch space shortage problem solution
Windows 7 RC version expires today automatically restarts
Linux Shell learning: uniq command usage method introduction
How to install win8 for virtual machine?
Windows XP can also burn discs
Coupling to help you on the blocked website Solution you come to learn
Windows XP system startup speed question and answer question