man node.conf (Formats) - LinuxNode configuration file.
NAME
node.conf - LinuxNode configuration file.
DESCRIPTION
Node.conf file is read by LinuxNode at program startup and is used to modify the behaviour of the node.
The lines within node.conf must either be a comment line, which starts with a # in the first column, or one of the commands listed below. Commands and arguments are delimited by white space. Arguments can contain white space if they are enclosed in single or double quotes. C style character literals are not parsed and parameter expansion (see below) is not done inside single quotes. Available configuration commands are:
- Alias <NAme> '<command> [<args...>]'
- Sets up a command alias. The number of uppercase characters at the beginning of <NAme> specifies how much the user may abbreviate the command. The uppercase part should be long enough to separate the command from other commands starting with the same letters. If there are no uppercase letters in the beginning, the whole name is converted to upper case and user can not abbreviate the command. Note that certain %-escapes (positional parameters, current time) have a reasonable meaning only when the alias is actually executed and thus they should not be parsed at the time the configuration file is read. This can be achieved by enclosing the command and argument part in single quotes. Another possibility is to use double quotes and escape the percent sign with a backslash (eg. \%1)
- ConnTimeout <timeout>
- When user is connected to another system via this system and the connection is idle (no data flowing in either direction) for <timeout> seconds the connection is dropped and user disconnected from node. Default is 3600 seconds (1 hour).
- EscapeChar <escape string>
- Specifies the escape character. The escape string may be specified using any of the well known codings:
- <char> to enter the escape character in its binary form.
- ^C to enter the escape character as a control character value.
- NNN to set the escape character to a Decimal value.
- 0xNN to set the escape character to a HexaDecimal value.
- 0NNN to set the escape character to an Octal value.
- off to disable the escape character. The default is CTRL-T (^T). Note that the escape mechanism breaks 8-bit transparency of LinuxNode and you should either disable it or set the no-escape flag in node.perms for the forwarding stations if (compressed) forward is run trough LinuxNode. Also the Escape user command can be used in a forward script to disable the escape (see node(8)).
- ExtCmd <NAme> <flags> <uid> <exec> <args...>
- Sets up an external command.
- NAme
- This is the name under which the command appears at nodes command list. The number of uppercase characters at the beginning of <NAme> specifies how much the user may abbreviate the command. The uppercase part should be long enough to separate the command from other commands starting with the same letters. If there are no uppercase letters in the beginning, the whole name is converted to upper case and user can not abbreviate the command.
- flags
- This is a sum of flags that control the way the external command is executed. Currently two flags are implemented:
- 1
- Run command through pipe. Without this flag node just fork()s and exec()s the specified command and then waits for it to terminate. The command must it self be aware about the underlying protocol. It must handle packetising and any end of line conversions. With this flag however node sets up a pipe between it self and the command and handles packetising and end of line conversions for it.
- 2
- Reconnected to flag. If this flag is set, the user gets a reconnected to prompt after the external command is finished.
- uid
- This is the userid that the following command should run under when executing.
- exec
- This is the executable that should be executed.
- args...
- These are the optional arguments that are passed to the executable. The first argument is the command name that is passed to the program (argv[0]). It is usually the executable name without path. See the Alias command for a discussion about the command arguments and %-escapes (parameter expansion).
- HiddenPorts <portname> ...
- Marks the AX.25 port <portname> as hidden. Hidden ports are not shown to users in Links, Mheard, Ports and Routes commands and can not be used to make AX.25 downlink connections unless user is specially permitted to do so (see node.perms(5)). Up to 32 hidden ports can be specified with this command.
- HostName <hostname>
- This is the visible hostname of the node. It will be shown at telnet login and in the node welcome message.
- IdleTimeout <timeout>
- After <timeout> seconds of inactivity while waiting for a command user is disconnected from node. Default is 900 seconds (15 mins).
- LocalNet <network>
- Defines a "local" network. Users telneting from hosts in this network are treated separately (see node.perms(5)). <network> is a KA9Q NOS style network address consisting of a dotted-quad IP address of the network and a number of significant bits separated by a slash. Note that 127.0.0.0/8 (loopback net) is also considered "local" by default.
- LogLevel <loglevel>
- Specifies what node should log. The available levels are:
- 0
- Don't log anything.
- 1
- Log only critical errors.
- 2
- Log errors and logins/logouts.
- 3
- Log errors, logins/logouts and all gateway commands.
Default is to log only critical errors.
- NodeId <id>
- This is the id that is shown in every message from node. Default is "LinuxNode}".
- NodePrompt <prompt>
- Sets the prompt string. The prompt string is evaluated every time it is printed so what was previously said about %-escapes (parameter expansion) in Alias command is valid here also.
- NrPort <portname>
- This is the name of the netrom port that is used when making outgoing netrom connects. Normally it should match the portname that is used in ax25d.conf to listen for incoming netrom calls. Default is the first netrom port.
- ReConnect on|off
- ReConnect flag. If enabled, users gatewaying to another host get reconnected to this node after the remote host closes connection. If it's off connection to the user will also be closed. User can override the default behaviour with a single `s' or `d' at the end of the gatewaying command (connect or telnet). Default is off.
- ResolveAddrs on|off
- If enabled, dotted-quad IP addresses are resolved to symbolic names when pinging or telneting out. Also, the domain name of the peer is resolved for telnet logins. Default is off.
CHARACTER LITERALS
C style character literals are parsed when reading the configuration file. The following formats are expanded:
- \n
- This is substituted with Line Feed
- \t
- This is substituted with Horizontal Tab
- \v
- This is substituted with Vertical Tab
- \b
- This is substituted with Backspace
- \r
- This is substituted with Carriage Return
- \f
- This is substituted with Form Feed
- \a
- This is substituted with Alert (BELL)
- \\
- This is substituted with Backslash (\)
- \"
- This is substituted with double quote (")
- \'
- This is substituted with single quote (')
- \xNN
- This is substituted with the character corresponding to the code value of NN interpreted as a hexadecimal number.
- \0NN
- This is substituted with the character corresponding to the code value of NN interpreted as an octal number.
- \0
- This is substituted with the NUL character (ascii 0)
PARAMETER EXPANSION
While reading the configuration file a word starting with a % is expanded. The following formats are expanded:
- %parameter
- This is substituted with the value of parameter
- %{parameter}
- The same as above.
- %{parameter:default}
- If parameter is defined this is susbtituted with the value of it. If not, the default value is substituted. This currently applies only to positional parameters 0...9.
The following parameters are defined:
- 0...9
- The positional parameters. Positional parameters are not meaningful while reading the node.conf so the default value (if present) is always substituted.
- F
- The full hostname in upper case.
- f
- The full hostname in lower case.
- H
- The hostname in upper case.
- h
- The hostname in lower case.
- I or i
- Current time (HH:MM:SS).
- N or n
- The node ID as set with the NodeId command.
- U
- The username (callsign) of the remote station in upper case without the SSID.
- u
- The username (callsign) of the remote station in lower case without the SSID.
- S
- The username (callsign) of the remote station in upper case with the SSID.
- s
- The username (callsign) of the remote station in lower case with the SSID.
- P
- The nodename (callsign) of the remote station (NET/ROM), the portname the user is coming in via (AX.25) or the ip address of the remote host (TCP). In upper case without the SSID.
- p
- The nodename (callsign) of the remote station (NET/ROM), the portname the user is coming in via (AX.25) or the ip address of the remote host (TCP). In lower case without the SSID.
- R
- The nodename (callsign) of the remote station (NET/ROM), the portname the user is coming in via (AX.25) or the ip address of the remote host (TCP). In upper case with the SSID.
- r
- The nodename (callsign) of the remote station (NET/ROM), the portname the user is coming in via (AX.25) or the ip address of the remote host (TCP). In lower case with the SSID.
- t
- The type of the user connection (ax25, netrom, rose, inet, host) in lower case.
- T
- The type of the user connection (ax25, netrom, rose, inet, host) in upper case.
Anything else after a % is substituted with a %.
FILES
/etc/ax25/node.conf