TNOS Frequently Asked Questions

TNOS Frequently Asked Questions.

Version 0.2 Started 27th March 1995. By Mike Dent.

This version dated 14th November 1995.

Introduction.
This is the Official Frequently Asked Questions document for TNOS. This document is designed to aid the TNOS user, and prospective user in setting up and maintaining a working TNOS system.

The document will take the form of common questions relating to TNOS, complete with answers. The document will cover both the Linux/Unix and DOS versions of TNOS. Where specific differences between the versions apply, they will be noted.

This document is prepared using the 'tkHTML 2.3' HTML editor for the X window system, using Linux. (Though to be honest much of it was done with good old vi & GPM selection !)

If you find any mistakes with this FAQ or have any suggestions etc, please mail me:- mike@lurpac.lancs.ac.uk

Notes.
In this FAQ I make reference to the TNOS 'home' or TNOS 'root' directory. These directories are the same and refer to the directory from which the other TNOS directories are made from. You may also see '..tnos/' and can take this to mean the same.

Where I make reference to Linux specifics, this may also apply to other Unix like operating systems as mentioned in question 5 below:-
"What platforms/operating systems has TNOS been successfully compiled/run on?".



General questions and comments.

TNOS is a multi-threaded application that contains a complete implementation of industry standard TCP/IP with drivers, applications, and support for use in an RF environment, primarily the Amateur Packet Radio environment.

There are two versions, one that runs under MS-DOS/PC-DOS/DR-DOS and any multi-taskers that support virtual DOS boxes, and the other which runs as an application under Linux and other unix systems.

TNOS serves as a good dedicated router, firewall, email exchanger, gateway, etc.

TNOS is derived from KA9Q NOS, and has many of the same roots as JNOS, another KA9Q derivitive.

Some of the TNOS differences from JNOS:

TNOS is supported by it's author, Brian A. Lantz/KO4KS, and several Internet mailing lists.

A lot more information on what TNOS is can be found here.








Sorry to have to ask, but this system does not know your HOME BBS!
This information is needed in order to properly send any mail to you from
users of this system.

Your HOME BBS is like your Postal Address. If you have already defined your
HOME BBS on another system, the name of that system is needed.

NOTE: only use a BBS hierarchial address, not a TCP/IP address.















################################################################################
# Startup file for Linux based TNOS, as used at gb7mbb.ampr.org.
# Virtually everything in this file applies to both DOS and Unix
# TNOS installations. 
# This file was annotated in somewhat of a rush to help out users who
# often request an example autoexec.nos file for TNOS. It is likely
# that you will have to heavily modify this sample file to make it 
# useful for your system. You have been warned!.
# Mike Dent. g6phf. October 1995. 
################################################################################
ip address 44.131.1.158
hostname gb7mbb.ampr.org
################################################################################
# Setup ax25 params before attaches. To modify on per/port basis, use
# ifconfig port ax25 param, after attaches.
################################################################################
ax25 user gb7mbb     # callsign to use on outgoing ax25 connects from console.
ax25 mycall gb7mbb-5 # callsign for incoming ax25 connects.
ax25 retry 15        # ax25 connection retries before giving up.
ax25 blimit 6        # backoff this many times then no more. default 30.
ax25 t4 100000	     # this is the link redundancy timer for ax25.
ax25 hsize 30        # number of stations in (J)heard listing.
ax25 version 2	     # hmm, lets use AX25 version 2.
ax25 maxframe 2      # no. of outstanding frames allowed without an ACK. max 7.
ax25 paclen 256      # length of ax25 packets.
ax25 window 2048     # window size allowed on ax25 frames.
ax25 maxwait 30000   # maximum timeout in msecs of the ax25 retry timer.
ax25 timer linear    # timer is either linear or exponential.
################################################################################
# Next our tcp/ip params. global.
################################################################################
tcp window 1024	     # tcp window size in bytes.
tcp mss 432	     # maximum segment size of datagrams.
tcp irtt 6000	     # initial round trip timer in milliseconds.
tcp retries 100	     # no. of tcp retries before giving up.
tcp maxwait 30000    # maximum timeout in msecs of the tcp retry timer. 
tcp blimit 20 	     # backoff this many times then no more.
tcp timer linear     # timer is either linear or exponential.
ip hsize 22	     # max no. of entries in mbox (IH)eard listing.
ip ttl 150	     # time to live.
################################################################################
# Attach interfaces next.
#################################################################################
# attach asy < port > - < mode > < iface > < buffsize > < mtu > < speed >
# attach < h/ware > < address > < - > slip|ax25|nrs < label > < buffers > < mtu > < speed > 
attach asy ttyS0 - ax25 2m 512 256 9600
attach asy ttyS1 - ax25 4m 512 256 9600
attach asy ttyS2 - ax25 70cm 512 512 19200
attach asy ttypf - slip sl0 2048 1024 38400
################################################################################
# Ifconfigs. These override global parameters above.
################################################################################
#
# ipcall sets the callsign/hwaddr to use on IP packets.
ifconfig 2m ipcall gb7mbb
ifconfig 4m ipcall gb7mbb
#
# set the mtu/window/blimit different for port '70cm'
ifconfig 70cm mtu 555
ifconfig 70cm tcp window 2048 
ifconfig 70cm tcp blimit 4 
#
# description below is displayed on mbox (PO)rts listing.
ifconfig 2m description "144.625 local access, tcp/ip channel. 1200bd.\nsl0    :  38400 internal slip link to Linux IP."
ifconfig 4m description "70.3375 access to WC and CRV nodes. 1200bd."
ifconfig 70cm description "9k6 WW Amprnet link at 70cms."
#
# rx queue and tx queue. (refer to other documentation.)
asyconfig 70cm rxq 5 
asyconfig 70cm txq 5 
#
################################################################################
# Netrom params
################################################################################
#
attach netrom		# kind of like 'start netrom' :-)
netrom interface 4m 192	# quality to use for our netrom port. '4m' in this case.
netrom call GB7MBB	# set this to your netrom callsign.
netrom alias MBBBBS	# and this to  your netrom alias. 
netrom retries 5	# no. of netrom retries before giving up.
netrom timer linear	# timer is either linear or exponential.
netrom promiscuous on	#
#
# load in netrom routing table from disk, file netrom.sav. This file is 
# created with 'netrom save' command.
netrom load		
#
################################################################################
# Domain params.
################################################################################
domain suffix ampr.org.		# gets added to all host names etc.
domain dns on			# set on if we want to process domain queries.	
domain addserver sys2.g0uje 	# set this to your domain server.
domain cache size 40		# no. of entries to hold in memory.
domain maxwait 30		# time to wait on a domain query of your server
################################################################################
# Convers commands.
################################################################################
convers host BayBBS	# what we call our convers server.
conv entry 131		# default channel users go to from the bbs conf alias.
#
# if set 'on' the user will see "*** Please login with '/n '" when they
# first enter the conference bridge. If set to 'off' they dont get this.
conv head on		# show login info when user first enters conf.
#
# message a user gets when he has logged in with /n  . you can
# use '\n' to add more lines to your login message.
conv motd "Please avoid channel 0. The default entry channel is 131.\nInternational users, if you have a more local convers server, please use that!" 
#
conv time on		# shows time when users come on/off convers.
#
# this is the maximum amount of data (bytes) that is allowed to backup in the
# queue for a user logged into the conference bridge before the connection
# is assumed to be in trouble and disconnected.
conv umaxq 12000	
#
# this is the maximum amount of data (bytes) that is allowed to backup in the
# queue for a host that is linked to your conference bridge before the 
# connection is assumed to be in trouble and disconnected.
conv hmaxq 12000	
#
# unixphf.ampr.org is the convers host I link to, and BayCONV is the name of it.
conv link unixphf.ampr.org BayCONV  
#
# sysinfo is displayed when a convers user requests '/sysinfo baybbs'.
conv sysinfo "g6phf@gb7mbb.ampr.org or mike@lurpac.lancs.ac.uk"
#
# when we type 'conf' from our console, this is the user we will be logged in as.
conv console g6phf
#
# this sets the type of filter mode. When set to accept, it will then only allow
# hosts to link in to your convers that you specifically allow.
conv filter mode accept
#
# allow *only* following hosts to link with our convers.	
conv filter unixphf
conv filter g0vgs
conv filter unix.g0vgs
conv filter ppc.g6crv
conv filter g6crv
############################################################################
# SMTP commands.
############################################################################
#
# set the smtp timer for 20 mins between processing of the smtp mail queue.
smtp timer 1200 # Time in seconds
smtp quiet yes # Do not ring bell when "New mail arrives".
#
# Do not batch up mail when sending. Can cause problems with some *nix MTA's. 
smtp batch off
#
# our mail gateway.
smtp gateway gb7mbb
#
# If you have 'smtp hopper' in your compile, this may cause problems if you
# route to hosts you send mail to via IP only routers, e.g. TheNet nodes.
# I set it to off to avoid this as I route mail via a TheNet X1J node.
#smtp hopper off	# not compiled in so #'d out anyway!
#
# set the smtp delivery timeout for mail which cannot be delivered.
# return to sender after 4 days.
smtp dtimeout 96	# time in hours.
# Fast compression mode.
lzw mode fast
##############################################################################
# Some commands for the running of my BBS, gb7mbb.
##############################################################################
# set expire timer to 12 hours. Expires mail areas depending on settings in
# spool/expire.dat and also will delete mail marked for deletion.
expire 12
# set the string users get when the BBS is performing maintenance.
mbox maintstr "Sorry, automatic BBS maintenance is in progress. Logins are disabled.\nPlease call back in a short while. (5 mins or so)."
#
# Bump users off when expire process kicks, and send them maintstr above.
mbox maintclear on
#
# we act as a white pages client and server.
wpages client on
wpages server on 
wpages dest gb7ulv # where to send our WP updates.
#
# this checks our outbound mails R: lines to see if they contain the callsign(s) 
# of any BBS's that are in our forward.bbs file. If so they do not get forwarded
# out.
bulletin check on
#
# hold locally entered bulletins for review by sysop before forwarding.
bulletin hold on
#
# check R: lines for user return address etc.
bulletin return on
##############################################################################
# Mailbox commands.
###############################################################################
#
# users get this text when they attempt a chat/tty with you.
motd "If I dont answer shortly, leave a message @gb7mbb.ampr.org, Mike"
#
# message displayed just before the 'login:' prompt.
mbox tmsg "Please login with your callsign, and use your name for the password."
#
# motd displayed just before the 'A,B,C..Z>' prompt.
mbox motd "For help on using this system type 'TUTOR'. For news about this \nsystem 'NEWS'. For other information type 'INFO'\n
#
# set to 1 to always display  the file 'spool/motd' at logins. Comes just
# after the [TNOS-2.01-BFHIMT$] banner.
mbox motdalways 1
#
# users idle this long (secs) are bumped off the BBS.
mbox tdisc 1800
#
# this sets the 'Send this message (N=no)?' query on or off after users have
# finished entering a message.
mbox sendq off
#
# log mailbox logins to spool/mbox.log in this form:-
# MBOX from g6phf (Mike) on Sun, 12 Mar 95 18:02:55 UTC
mbox log on
#
# message users see when they (B)ye from BBS. '\n' inserts carriage return & LF
mbox mexit "\n73, Call again\nMike!"
#
# maximum session time (secs) for users of the BBS.
mbox maxtimer 13600
#
# these define our custom commands. 
mbox cmd MUD "t unixphf 7777"
mbox cmd MUD2 "t unixphf 4000"
mbox cmd CONV "t unixphf 3600"
mbox cmd CALLUS "t 44.98.24.25 7373"
#
# this defines what we want our BBS prompt to look like. You must also include
# the commands above if you want users to see them.
mbox prompt "?,A,B,C,CALL,CALLUS,CONF,D,E,F,G,H,I,J,K,L,M,MUD,MUD2,N,O,P,Q,R,S,T,U,V,W,X,Y "
#
# set the mailfor beacon to 'on' 
mbox mailfor on
#
# how often (secs) to broadcast a mailfor beacon.
mbox mailfor 3600
#
# this adds the area prompt to the BBS for new users. Toggled with 'SET A'
# in the BBS.
mbox newuser area on
#
# this suppresses the 'beep/bell' when listing messages that some people insist
# on inserting in subject lines.
mbox nosubjbell on
#
# this defines wether we want the 'mbox tdisc' idle timer to affect users 
# defined as sysop or not. Set to 'off' sysops are not affected by tdisc,
# but will be bumped off if 'mbox maxtimer' is defined.
mbox tdiscsysop off
#
#####################################################
# NO AX25 access on 144.625Mhz. As from 1st Dec 94
#####################################################
# I dont allow any ax25 connects on the UK tcp/ip channel.
mbox noax25 2m on
##############################################################################
# NTS mail forwarding commands
##############################################################################
#
# this allows me to use a 2 letter continent designator. 'EU'.
forward tapr off
# 
# sets my hierarchical BBS address. Note, no callsign needed.
forward haddress #16.GBR.EU
#
# with 'fwdinfo' , 'rcall' and 'qth' below, my R: line looks like this:-
# R:951015/2157z @:GB7MBB.#16.GBR.EU [Morecambe] TNOS/U $:7388_GB7MBB
forward fwdinfo "Morecambe"
forward qth "TNOS/U"
forward rcall GB7MBB	# defines callsign in R: line.
#
# strip off smtp headers on outbound NTS mail.
forward smtptoo off
#
# use FBB type batched forwarding.
forward fbb-style on
#
# use FBB compression for forwarding too.
forward fbb-compression on
#
# define the callsign used for outgoing mail forwarding.
forward mycall GB7MBB
#
# set to 'on' to keep original BID in R: lines.
forward bid on
#
# set to 'on' to add a local MID to R: lines.
forward mid off
#
# set a forwarding session off each hour.
forward timer 3600 	# time in seconds.
#
##########################################################################
# Set TNC paramaters
##########################################################################
# set our KISS parameters for our TNC's. I use Tiny-2's.
# 
param 70cm 1 25         # TXdelay
param 70cm 2 64         # PPersist
param 70cm 3 5          # Slottime
param 70cm 4 5		# Tailtime
param 2m 1 30
param 2m 2 50
param 2m 3 5
param 2m 4 5 
param 4m 1 25
param 4m 2 50 
param 4m 3 5 
param 4m 4 5
#
# use device driver-level queuing, only good for *nix TNOS's I think.
param 70cm min 255
param 2m min 255
param 4m min 255
###########################################################################
# FTP commands.
###########################################################################
#
ftpmax 3 	# maximum number of incoming FTP sessions allowed.
ftype image	# set default transfer type. image or ascii.
ftptdisc 900	# FTP idle disconnect timer in seconds.
#
#############################################################################
# TCP and IP access stuff.
##############################################################################
# Allow 44 stuff of course.
tcp acc permit 44/8 1 8888
# Allow some other stuff.
tcp acc permit 148.88/16 1 8888
tcp acc permit 194.80.36/24 1 8888
tcp acc permit 127.0.0.1 1 8888
# anything else is ignored.
# load in our ip access rules from file 'ipaccess'.
source ipaccess
#
##############################################################################
# Misc commands.
##############################################################################
#
ip hport sl0 on		# show ip hosts heard on slip port, 'sl0'.
#
# set the console prompt to display the directory we are in. My console prompt
# looks like this:- '/home/g6phf/bin/tnos> '
prompt dir
#
# this sends our tracing output to the screen 'under' Fkey 9.
strace on
#
# this sets the permission that users connecting via netrom/ax25 get. See
# security section of FAQ.
security ax25 1441835     
#
# when a user attempts to telnet to a non ampr host, i.e. non 44.x.y.z. With 
# 'security ampr on' set, a message will be sent telling them :-
# 'Sorry, but only Amateur Radio IP stations can be reached from here!'
# see security section of FAQ for more explanations.
#
security ampr on
#
# this uses the 'callbook' at pi8esk for 'CALL' look ups.
callserver pi8esk
#
statline on quiet	# I like the status line, but don't like the bell!
history 30		# keep 30 entries in command buffer. Up/Down arrows.
# 'gone' refuses incoming ttylink (port 87) and BBS 'o' chats.
gone
#
source routes   # this reads in my routes file 'routes' off disk.
#
# log to 'net.log' file.
log net.log
##############################################################################
# Some 'at' commands.
##############################################################################
#
# 'here' and 'gone' are for incoming tty sessions and BBS 'o'.
# 'gone' sets 'attend off' and 'mbox attend off'. 'here' does the reverse.
at 1730 "here+" 	# at 17:30  I'm here.
at 2115 "gone+"		# at 21:15 now I'm gone!
#
# do a tcp clean to reset any tcp  sockets in FIN WAIT 2 state every 3hrs.
at now+0300 "tcp clean+" 
#
# This is a special for my log renaming program run from crontab.
at 0000 "log net.log+"
#
# at 04:00 do a wpages update at 0400, sorting the wpages files.
at 0400 "wpage kick+"
#
# at 05:00 kick out wpages updates to BBS(s) specified in 'wpages destination'
at 0500 "wpages update now+"
# 
# at 05:30 expire mail areas depending on settings in
# spool/expire.dat and also delete mail marked for deletion.
at 0530 "expire now+"
#
##############################################################################
# START servers at end of file!
##############################################################################
start ax25
start telnet
start ftp
start netrom
start smtp
start remote
start finger
start tutor
start info
start convers
start news
start time
start pop3
start ttylink
#
# Thats all folks!
##############################################################################




Questions and comments relating to hardware issues.


Questions and comments relating to software/operating system.


-----unixasy.c before mod for FreeBSD--------

 #if 1         /* This is obsolete stuff! */
     termios.c_cflag &= ~CBAUD;
     termios.c_cflag |= speed_table[sp].flags;
 #endif
-----------------------------------------------


-----unixasy.c after mod for FreeBSD-----------

 #if 0         /* This is obsolete stuff! */
     termios.c_cflag &= ~CBAUD;
     termios.c_cflag |= speed_table[sp].flags;
 #endif
------------------------------------------------
After this mod TNOS 1.13 should work ok with FreeBSD.





########################################################################
# Usually these lines can be put in one of the rc.* files found in     #
# the /etc/rc.d directory, at least that is the case for the Slackware #
# Linux distriution. I recommend the file /etc/rc.d/rc.inet1, though   #
# rc.local is an alternative.					       #
# Add these lines to the bottom of the file.			       #
########################################################################
#
# First we must set up a pseudo slip port at the Linux kernel side to
# talk to linux. If this is your only slip port on your Linux machine
# it will become 'sl0'. If you already have a slip port configured on
# your machine, say to talk to a modem or another pc, then this port
# will become 'sl1'. Your will need to know this for later. We will assume
# that it is your only slip port, 'sl0'.
#
/sbin/slattach -v -s 38400 -p slip ptypf &
#
# OK, that is the port attached, now we must wait a while for it to get a
# hold before we can configure it.
#
/bin/sleep 1
#
# Right that should have done it. We now have a slip port 'sl0' attached
# to the kernel. The -v indicates verbose, so we can see everything is
# ok, the -s is the speed 38400, the -p is the port, ptypf in this case
# and the ampersand is to put the command in the background.
#
# Next we shall configure it and assign it an IP address. You must
# have seperate IP addresses for TNOS and Linux. Make sure you have
# these entries in /etc/hosts also.
#
/sbin/ifconfig sl0 linux.g6phf.ampr.org up
#
# Ok we have now assigned the Linux kernel IP stack with its own
# IP address and set it in an 'up' or working state.
# Next we must add a route to TNOS down the pseudo slip link, 'sl0',
# so the kernel IP knows how to reach it.
#
/sbin/route add g6phf.ampr.org sl0
#
# Right now the kernel IP knows how to reach TNOS, we should tell
# the kernel how to reach the other 44.x.y.z addreses.
#
/sbin/route add 44.0.0.0 gw g6phf.ampr.org sl0
#
# That should do it. We have added a route to all 44 addresses via the
# gateway 'gw' of g6phf.ampr.org (TNOS) down sl0.
# If you wanted to add any other routes to non 44 addresses, you would
# do it in the same way, e.g.
# /sbin/route add 148.88.0.0 gw g6phf.ampr.org sl0
#
# NOTES: If you paste the above file into one of your rc.* files
# remember to change g6phf.ampr.org to your TNOS hostname and
# linux.g6phf.ampr.org to your Linux hostname. These hostnames will
# also need to be in your /etc/hosts file, and your ../tnos/domain.txt.
########################################################################

Ok, now we have configured and setup the Linux IP stack to talk to TNOS via a pseudo (internal) slip link. We used the device /dev/ptypf for the port 'sl0', we shall now use the other end of this slip link /dev/ttypf for our interface within TNOS.
Below are the necessary lines for your ../tnos/autoexec.nos file.

#####################################################################
# Lines needed in autoexec.nos file for Linux TNOS this allows TNOS #
# to talk to the Linux IP stack and visa-versa.			    #
#####################################################################
#
# First we must attach the port. Put this attach line with your other
# attach statements.
#
attach asy ttypf - slip kernel 1024 512 38400
#
# As you can see the format is very similar to your other attach  
# statement(s). /dev/ttypf is the other end of the pseudo  
# slip port from /dev/ptypf, the Linux kernel end. 'slip'
# is of course the protocol used, 'kernel' is the name of the interface
# I have chosen, you can of course call this 'sl0' or whatever you like.  
# 1024 is the buffer size, 512 the MTU of the port and 38400 the speed.
#
# Now we must add a route to the Linux IP stack down out port 'kernel'.
#
route add linux.g6phf.ampr.org kernel
#
# Make sure your hostname and IP address are in your ../tnos/domain.txt
# file. If we want other people to be able to access your Linux IP, be
# it for smtp, ftp or whatever, then it is best if your TNOS will answer
# ARP queries for it. So we need to advertise that fact. We use 'proxy'
# arp to do that.
#
arp publish linux.g6phf.ampr.org ax25 g6phf 2m
#
# In the statement above replace linux.g6phf.ampr.org with the hostname
# or IP address of your Linux kernel, replace g6phf with your ax25
# callsign, and replace '2m' with the interface name of your radio port.
# If you have several radio ports you may need to arp publish your
# Linux address on each port. I have 2 more entries like this:-
# arp publish linux.g6phf.ampr.org ax25 g6phf 4m
# arp publish linux.g6phf.ampr.org ax25 g6phf 70cm
#
########################################################################

Ok that should do it, you should now be able to sucessfully communicate between TNOS and your Linux kernel. Test it by trying a ping or better still telnet between the two. If it fails make sure you have a kernel with SLIP compiled in, (check /var/adm/messages or watch your system bootup messages) also make sure TNOS has SLIP in it and that you have the speeds set correctly at each end.
NOTE. You will have to reboot your machine for the changes in rc.local to take effect. I recommend typing them in by hand (logged in as root) at the Linux prompt first to check you have everything correct.








Mike Dent. mike@lurpac.lancs.ac.uk. v0.2 14th November 1995.

Last updated: Sunday, 25-Jan-2004 14:20:51 UTC