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的文件就不公布了。

发表回复

登录... 后才能评论