Easy office-N2N makes it easy to set up a local area network

N2N sets up a local area network for remote debugging.

N2N windows and linux platform installation package

1. Server configuration

I am using Alibaba Cloud's Windows server, so I downloaded the Windows version of N2N supernode.
Note: 1. Since N2N uses the UDP protocol, the server must open the UDP protocol entrance and exit.
2. The configured supernode port number must be set to allow in the server's entrance and exit rules.
The server configuration file supernode.conf is as follows


#        The configuration file is similar to the command line, with one option per line. An equal
#        sign '=' should be used between key and value. Example: -p=7777
#        This file contains a basic configuration example, please refer to the help (-h) for the full
#        list of available options.
#
#       -p
#        Sets the UDP listening port. 
#
-p=7777
#
#        -c
#        Optionally specifies the allowed communities as listed in community.list file.
#
# -c=community.list

3. Execute supernode.exe to start the service

2. Windos client edge node

Edge nodes include windos platform and ubuntu platform.

  1. Windows platform
    requires the use of a virtual network card, so you need to install openVPN,
    set the virtual network card TAP-windows Adapter V9 and rename it to "net0"
    , and then execute edge.exe to start the node
  2. Ubuntu platform
    execute edge edge.conf to start the node
  3. Configure edge.conf
#
#         The configuration file is similar to the command line, with one option per line. An equal
#        sign '=' should be used between key and value. Example: -c=mynetwork or --community=mynetwork
#        This file contains a basic configuration example, please refer to the help (-h) for the full
#        list of available options.
#
#       -d|--tun-device
#        Specifies the name of the TUN interface. 
#虚拟网卡名称
-d=net0
#
#       -c|--community
#        Specifies the n2n community name the edge belongs to.
#虚拟节点所属组
-c=group
#
#       -k
#        Sets the encryption key (ASCII). The environment variable N2N_KEY=<key> can also be used. 
#虚拟节点所属组密码
-k=pass
#
#       -m
#        Specified the MAC address for the TAP interface (random otherwise).
#
# -m=DE:AD:BE:EF:99:99
#
#       -a
#        Sets the interface address. For DHCP use '-r -a dhcp:0.0.0.0'.
#虚拟地址IP
-a=182.22.22.22
#
#       -p
#        Sets the local UDP port to a fixed port.
#
-p=50001
#
#       -l|--supernode-list
#        Specifies the supernode IP and port.
#公网IP:端口
-l=*.*.*.*:7777
#

Guess you like

Origin blog.csdn.net/xwb_12340/article/details/132343692