13. 配置节点软件

节点软件由Tomi Manninen开发,基于最初的PMS程序。它提供了一个相当完整和灵活的节点功能,并且易于配置。它允许用户在连接后进行Telnet、NET/ROM、ROSE和AX.25连接,并获取各种信息,例如Finger、节点和听到列表等。您可以配置节点来执行您希望的任何Linux命令,这非常简单。

节点通常从ax25d程序调用,尽管它也能够从TCP/IP inetd程序调用,以允许用户通过telnet连接到您的机器并访问它,或者通过从命令行运行它。

13.1. 创建/etc/ax25/node.conf文件

node.conf文件是进行节点主要配置的地方。它是一个简单的文本文件,其格式如下

# /etc/ax25/node.conf
# configuration file for the node(8) program.
#
# Lines beginning with '#' are comments and are ignored.

# Hostname
# Specifies the hostname of the node machine
hostname	radio.gw.vk2ktj.ampr.org

# Local Network
# allows you to specify what is consider 'local' for the
# purposes of permission checking using nodes.perms.
localnet	44.136.8.96/29

# Hide Ports
# If specified allows you to make ports invisible to users. The
# listed ports will not be listed by the (P)orts command.
hiddenports	rose netrom

# Node Identification.
# this will appear in the node prompt
NodeId		LINUX:VK2KTJ-9

# NET/ROM port
# This is the name of the NET/ROM port that will be used for
# outgoing NET/ROM connections from the node.
NrPort		netrom

# Node Idle Timeout
# Specifies the idle time for connections to this node in seconds.
idletimout	1800

# Connection Idle Timeout
# Specifies the idle timer for connections made via this node in
# seconds.
conntimeout	1800

# Reconnect
# Specifies whether users should be reconnected to the node
# when their remote connections disconnect, or whether they
# should be disconnected complete.
reconnect	on

# Command Aliases
# Provide a way of making complex node commands simple.
alias		CONV	"telnet vk1xwt.ampr.org 3600"
alias		BBS	"connect radio vk2xsb"

# External Command Aliases
# Provide a means of executing external commands under the node.
# extcmd <cmdname> <flag> <userid> <command>
# Flag == 1 is the only implemented function.
# <command> is formatted as per ax25d.conf
extcmd		PMS	1	root	/usr/sbin/pms pms -u %U -o VK2KTJ

# Logging
# Set logging to the system log. 3 is the noisiest, 0 is disabled.
loglevel	3

# The escape character
# 20 = (Control-T)
EscapeChar      20

13.2. 创建/etc/ax25/node.perms文件

节点允许您为用户分配权限。这些权限允许您确定哪些用户应该被允许使用诸如(T)elnet和(C)onnect命令之类的选项,以及哪些用户不应该。node.perms文件是存储此信息的地方,包含五个关键字段。对于所有字段,星号“*”字符匹配任何内容。这对于构建默认规则很有用。user

第一个字段是应用权限的呼号或用户。任何SSID值都将被忽略,因此您应该在此处仅放置基本呼号。

method

每个协议或访问方法也被赋予权限。例如,您可能允许通过AX.25或NET/ROM连接的用户使用(C)onnect选项,但阻止其他用户,例如从非本地节点通过telnet连接的用户访问它。因此,第二个字段允许您选择此权限规则应应用于哪个访问方法。允许的访问方法有

Method

方法Description
描述ampr
用户通过amprnet地址(44.0.0.0)进行telnet连接ax25
用户通过AX.25连接host
用户从命令行启动节点inet
用户通过telnet连接,地址为非本地、非ampr地址。local
用户从“本地”主机通过telnet连接netrom
用户通过NET/ROM连接rose
*用户通过ROSE连接

用户通过任何方式连接。

port

端口

对于AX.25用户,如果您选择,也可以在每个端口的基础上控制权限。这允许您根据AX.25用户连接到您的哪个端口来确定他们被允许做什么。第三个字段包含端口名称(如果您正在使用此功能)。这仅对AX.25连接有用。

password

密码

您可以选择配置节点,以便在用户连接时提示用户输入密码。这可能有助于保护具有高级权限的特殊配置用户。如果设置了第四个字段,则其值将是将被接受的密码。Description
1permissions
2权限
4权限字段是文件中每个条目的最后一个字段。权限字段被编码为位字段,每个功能都有一个位值,如果设置,则允许使用该选项;如果未设置,则阻止使用该功能。可控制的功能及其对应的位值列表如下
8Value
16
32Login allowed.
64允许登录。
128AX.25 (C)onnects allowed.

允许AX.25 (C)onnect连接。

NET/ROM (C)onnects allowed.允许NET/ROM (C)onnect连接。(T)elnet to local hosts allowed.

# /etc/ax25/node.perms
#
# The node operator is VK2KTJ, has a password of 'secret' and
# is allowed all permissions by all connection methods
vk2ktj	*	*	secret	255

# The following users are banned from connecting
NOCALL	*	*	*	0
PK232	*	*	*	0
PMS	*	*	*	0

# INET users are banned from connecting.
*	inet	*	*	0

# AX.25, NET/ROM, Local, Host and AMPR users may (C)onnect and (T)elnet
# to local and ampr hosts but not to other IP addresses.
*	ax25	*	*	159
*	netrom	*	*	159
*	local	*	*	159
*	host	*	*	159
*	ampr	*	*	159

允许(T)elnet连接到本地主机。

(T)elnet to amprnet (44.0.0.0) hosts allowed.允许(T)elnet连接到amprnet (44.0.0.0)主机。(T)elnet to non-local, non-amprnet hosts allowed.允许(T)elnet连接到非本地、非amprnet主机。Hidden ports allowed for AX.25 (C)onnects.允许(T)elnet连接到amprnet (44.0.0.0)主机。文件

[vk2ktj-1 via radio]
default    *     *    *   *   *   0    root /usr/sbin/node node

允许AX.25 (C)onnect连接的隐藏端口。允许(T)elnet连接到非本地、非amprnet主机。ROSE (C)onnects allowed.允许ROSE (C)onnect连接。要为规则编码权限值,只需将您希望用户拥有的每个权限的值加在一起。结果数字就是您放在第五个字段中的内容。

A sample

一个示例

nodes.perms

nodes.permsmight look like可能看起来像

node	3694/tcp	#OH2BNS's node software

13.3. Configuring node to run from ax25d13.3. 配置节点ax25d运行可能看起来像

node	stream	tcp	nowait	root	/usr/sbin/node node

节点程序通常由ax25d程序运行。要做到这一点,您需要将适当的规则添加到