n2n配置supernode相关参数和文件
n2n安装后,会默认创建对应的服务:
edge.service edge@.service
[Unit]
Description=n2n edge process, on %I
After=network-online.target syslog.target nfw.target
Wants=network-online.target
[Service]
Type=simple
ExecStartPre=
ExecStart=/usr/sbin/edge /etc/n2n/edge-%i.conf -f
Restart=on-abnormal
RestartSec=5
[Install]
WantedBy=multi-user.target
Alias=
supernode.service
[Unit]
Description=n2n supernode process
After=network-online.target syslog.target
Wants=network-online.target
[Service]
Type=simple
User=n2n
Group=n2n
ExecStart=/usr/sbin/supernode /etc/n2n/supernode.conf -f
Restart=on-abnormal
RestartSec=5
[Install]
WantedBy=multi-user.target
Alias=
按照以上的配置文件位置,配置对一个的参数即可。
我的配置参数如下:
supernode.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: -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=10086
#
# -c
# Optionally specifies the allowed communities as listed in community.list file.
#
-c=/etc/n2n/community.list #账户和群组验证文件
-F=280i #组信息
-a=172.20.0.0-172.20.255.0/24 #自动分配网段
community的文件就不公布了。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。