Configure L2 point-to-point VPN using n2n

Source: Internet
Author: User

Configure L2 point-to-point VPN using n2n

N2n is a two-layer point-to-point virtual private network (VPN) that allows users to develop typical P2P application functions at the network level rather than at the application level. This means that users can gain local IP visibility (for example, two PCs belonging to the same n2n network can ping each other), and no matter which network they are in, the same network IP address can be accessed. In short, just as OpenVPN has moved SSL from an application (for example, to an https protocol) to a network protocol, n2n has moved P2P from the application to the network layer.

N2n Main Functions

N2n is a P2P-based encrypted L2 private network.

Encryption is deployed on edge nodes using an open protocol, which uses a user-defined encryption key: You control security on your own without authorizing the company, whereas Skype or Hamachi is required.

Each n2n user can belong to multiple networks (or communities) at the same time ).

It has the ability to traverse NAT and firewall in the direction of reverse communication (for example, from the external to the internal), so it can reach the n2n node, even if it runs in a private network. Firewall is no longer an obstacle for IP control over communications.

The n2n network does not mean that it is independent. It can communicate through routes between n2n and n2n networks.

The n2n architecture is based on two components.

Super node: It is used at startup for edge nodes or nodes after symmetric firewalls. For these nodes, the application is mainly a directory register and a packet router, rather than direct communication.

Edge node: An application installed on the user's PC that allows the construction of an n2n network. In fact, each edge node creates a tun/tap device, which is the entry point of the n2n network.

Install n2n to Ubuntu

Open the terminal and run the following command

  1. $ Sudo apt-get install subversion build-essential libssl-dev
  2. $ Svn co https://svn.ntop.org/svn/ntop/trunk/n2n
  3. $ Cd n2n/n2n_v2
  4. $ Make
  5. $ Sudo make install
Configure P2P VPN using n2n

First, we need to configure a super node and any number of edge nodes.

Decide where to place the super node. Assume that you have placed it on the xyw port of host a. B. c. d.

Determine which password encryption is used to ensure data security. Suppose you use the password encryptme.

Determine the network name you want to use. Suppose you name it mynetwork. Note: You can use super nodes or edge nodes to process multiple networks, not just one.

Determines the IP address used on the edge node. Suppose you use 10.1.2.0/24.

Start the application:

Configure super nodes
  1. Supernode-l xyw
Configure Edge Nodes

On each edge node, run the following command to connect to the P2P VPN.

  1. Sudo edge-a 10.1.2.1-c mynetwork-k encryptme-l a. B. c. d: xyw
  2.  
  3. Sudo edge-a 10.1.2.2-c mynetwork-k encryptme-l a. B. c. d: xyw
Test your n2n network now
  1. Edge node1> ping 10.1.2.2
  2.  
  3. Edge node2> ping 10.1.2.1

Windows n2n VPN Client (N2N edge graphic interface)

You can download the N2N edge graphic interface from here.

The N2N edge graphic interface is a basic installer and GUI for point-to-point 'n2n VPN scheme.

Build and configure PPTP and OpenVPN in CentOS5-based Linux

Use PPTP to build a VPN

PPTPD for RHEL5.4 VPN service configuration

The problem of configuring NAT forwarding in PPTPd on Ubuntu VPS

Install pptp vpn under CentOS

Linux VPN (PPTPD) + Windows AD unified authentication

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.