n2n最新地址https://github.com/ntop/n2n
下载安装最新版安装包
supernode超级节点
在/etc/n2n/supernode.conf添加端口,白名单或防火墙方向以下端口,其他edge节点就通过supernode的这个端口进行通讯
-p=1234
然后启动服务并加入自启动
systemctl enable --now supernode.service
edge边缘节点
sudo edge -c mynetwork -r -n 10.131.31.0/24:179.10.10.5 -n 192.168.100.0/24:179.10.10.2 -n 10.0.25.0/24:179.10.10.15 -k liweilun123. -A4 -a 179.10.10.1 -f -l 1.1.1.1:59966
-c <community> | n2n community name the edge belongs to 表示n2n组网属于那个集群
-r | enable packet forwarding through n2n community 表示允许数据包通过n2n网关传递
-n <cidr:gateway> | route an IPv4 network via the gateway, use 0.0.0.0/0 for
| the default gateway, can be set multiple times 表示通过某个n2n节点作为网关进行访问该ipv4网段,可以设置多个-n参数
-k <key> | encryption key (ASCII) - also N2N_KEY=<key> 表示加密密钥值
-A1 | disable payload encryption, do not use with key, defaults
| to AES then 表示加密方式,A1表示禁止加密,不添加A参数表示默认AES加密
-A2

本文介绍了如何配置n2n网络,包括设置supernode超级节点和edge边缘节点,详细解析了各参数含义,如端口、加密方式和网络路由。同时展示了通过命令行查看n2n流量的过程,强调了p2p流量通讯依赖于supernode转发的重要性。
364

被折叠的 条评论
为什么被折叠?



