GW.KF9UG.AMPR.ORG
JNOS CONFIGURATION FILES

The configuration files described below reflect how GW.KF9UG.AMPR.ORG used to be configured when it used a dialup connection to the Internet. As of December '99 I am using a cable modem to access the Internet from GW.KF9UG.AMPR.ORG's QTH. These configuration files give an example of setting up JNOS to connect to your ISP through a dialup connection.

OVERVIEW

JNOS uses various configuration files to control how it will operate and what options are enabled and configured. In addition to the JNOS configuration files, Linux configuration files are adjusted to control how JNOS is started and restarted in the event the JNOS process terminates.



STARTING JNOS

/etc/inittab

The '/etc/inittab' Linux script is read by the Linux 'initd' process when a Linux system is first started. The 'initd' process starts the various system programs depending upon the state of the Unix system. A feature of the 'initd' program is that it will restart a program if it terminates. I chose this program to start JNOS by including a line that executes the 'startnos' script when the 'initd' program determines that JNOS is not running.

/jnos/startnos

The 'startnos' script is located in the '/jnos' directory. This script has been written so it will check to see if the JNOS program is already running and if it is then it will terminate it. Then it removes all JNOS lock files in the 'spool/mail' and 'spool/mqueue' directories if any exist from a previously running JNOS process. Failure to remove these files would result in some mail areas being reported as BUSY and SMTP queued messages from not being sent. Then it will change the current directory to the '/jnos' directory where I have chosen to store the JNOS program and it's associated data and configuration files. It then sets up environment variables, waits 15 seconds, then calls a program I wrote called 'iftime'.

/usr/local/src/iftime/iftime

Since GW.KF9UG.AMPR.ORG is not connected to the Internet 24hrs/day, my system must determine if it should connect to the Internet when JNOS is first started. I use the program 'iftime' to determine if JNOS should connect to the Internet when it starts or to not connect immediately. If the current system time is within the time given in the 1st and 2nd parameters to 'iftime', it will echo back the 3rd parameter. If the current system time is not within the time given in the 1st and 2nd parameters to 'iftime', it will echo back the 4th parameter. The 1st and 2nd parameter are to be in this format: hhmm where hh is the hour (00-23) & mm is the minute (00-59). In my system, you'll notice that the 1st time is later than the 2nd. This is not an error. This is because the system connects to the Internet in the afternoon and disconnects in the morning.

I have written a JNOS startup script, '/jnos/autoexec.ppp' that executes the contents of '/jnos/autoexec.nos' and then schedules a connect attempt to the Internet in the near future. So if it is within the time JNOS should be connected to the Internet, then JNOS is started with the '/jnos/autoexec.ppp' script, otherwise it is started with its default startup script '/jnos/autoexec.nos'.

I had to include the 'iftime' program because of the case when JNOS would crash during the time it was connected to the Internet. When JNOS would restart (via /etc/inittab & startnos) it would not reconnect to the Internet until the next day. That was unacceptable to me. If that would be acceptable to you, then you don't need to worry about the 'iftime' program and its functionality.

/jnos/autoexec.ppp

This file's main goal is to configure the JNOS system in the same way as the '/jnos/autoexec.nos' file and then schedule a connect to the Internet in the near future.

/jnos/autoexec.nos

This file configures the entire JNOS software and starts the various system services. I have moved some of the host specific configuration lines to the 'hostname.nos' file to make it easier for me to clone new systems from my existing system. This script calls the '/jnos/encap.txt' file which sets up the encapsulated routes to other AMPRnet Gateways. Then near the end of this script I call the 'pollbbs', 'kiss', 'startup.ppp', 'clean', & 'stop.ppp' scripts in the future using the "AT" command. Descriptions of these scripts are given below.

/jnos/hostname.nos

This file is one I devised to move host specific information out of the 'autoexec.nos' file so I could easily determine what JNOS commands only need to be modified between different systems I run. The host specific information contained in this file are: hostname, ip address, AX.25 callsign, AX.25 BBS callsign, AX.25 tty callsign, & AX.25 beacon text. You would not need to move these items from the 'autoexec.nos' file to this one if you did not wish to do so. (Actually there are other host specific parameters I should have moved here too if I was to move them all here.)

/jnos/encap.txt

The 'encap.txt' file is a protected file that contains the routing information to all AMPRnet gateways around the world. It is protected by limiting who can have access to the routing information contained in the file. The routing information is sensitive because it could allow a non-amateur radio operator to work their way around the protection schemes implemented by ALL AMPRnet Gateway sysops and thus gain access to RF ports around the world.

This file may be omitted if you do not plan on running your system as an Internet Gateway. If you do plan on running your system as an Internet Gateway, you should go to The Gateways Home Page and read all the information there and sign up as an AMPRnet gateway. Once you have done that, you'll be given permission to download the latest 'encap.txt' file from ftp.fuller.net.



CONNECTING TO THE INTERNET

You can connect to the Internet via a dialup modem or by locating your gateway on a LAN of an ISP or other party willing to give you access to the Internet. A connection via a LAN would eliminate problems inherent with a dialup connection. Below is a description of various ways to connect your JNOS system to the Internet.

Dialup Access

Connecting to the Internet via dialup from a JNOS system is fraught with difficulties because every ISP does things a little differently and you must be prepared to handle how to connect to all these various systems. Most dialup accounts offer what is called dynamic IP addressing. This means that every time your system connects to them, you get a different IP address. Connecting to the Internet with a dynamic IP address would work if all you want to do is access the Internet from your JNOS system, but it won't work if you want other people on the Internet to access your system. The reason is that the people on the other end won't be able to tell what IP address they should connect to since it is different each time. I have read that the 1.11b version of JNOS does support dynamic IP addresses such that people can connect to your system but in order for it to work, you need to make arrangements with someone running version 1.11b to make it work. The alternative is what is known as a static IP address. This means that you are assigned the same IP address every time you dialup your ISP.

Static IP Addresses

A static IP address assigned by your ISP for your dialup account is necessary for others on the Internet to be able to reach your system. Ideally, it is best to have 2 static IP addresses, one for your Linux system, and one for JNOS. Ideally, it is best to let your Linux system handle the dialup connection to the Internet instead of having JNOS handle it. Ideally, an ISP would give you 2 static IP addresses to make your life easier. But this is far from an ideal world. I have found that ISPs really don't like to give out static IP addresses because of the benefits you could realize that go beyond the scope of running an AMPRnet gateway. Thus most ISPs want to charge you an arm and a leg if they do allow you to do have one.

GW.KF9UG.AMPR.ORG's Current ISP Arrangement

THE WAY IT IS NOW...

I have an agreement with Comcast cable for one static IP addresses for my local network of computers which GW.KF9UG.AMPR.ORG is a part of. GW.KF9UG.AMPR.ORG is now hidden behind another Linux computer that acts as a gateway to keep hackers from attacking my Windows based computers.

THE WAY IT USED TO BE...

When I used to connect to a previous ISP via dialup, I found that I had to use the JNOS dialer to connect to the Internet instead of allowing Linux's built in PPP dialer to connect to my ISP. Instead of being able to take advantage of the built in features of Unix, I was faced with using a less than optimum connection offered by JNOS. But the good news is: it worked. My previous ISP served their dialup connections via Windows NT Server 4.0. If your ISP serves connections with a different system, your IPCP and LCP parameters may need to be adjusted.

/jnos/start.ppp (The connect script)

I used to use the 'start.ppp' file to initiate a dialup connection to the Internet via my ISP. This script 1st sets up parameters specific to a PPP (Point-To-Point) connection and then issues the JNOS 'dialer' command to connect to the Internet. The 'dialer' program uses a file I generated named 'central.net' that contains the dialer commands. One minute after the dialer command is issued, this script used to set up mailbox aliases of other Internet systems (optional), modifies the IP routing table to use the new PPP link for all IP packets not specifically routed elsewhere, adds references to my ISP's domain name servers (DNS) to resolve unknown internet domain names, starts collecting email from my ISP for my email account with them, and schedules JNOS to connect to the Internet tomorrow at the same time.

/jnos/central.net (the connect dialer script)

This script is a dialer script invoked by JNOS's 'dialer' command from the '/jnos/start.ppp' file when it is time to connect to the Internet. It contains all the commands necessary to instruct the 'dialer' program to talk to the modem to connect to the ISP. I have included 2 retry attempts in case the ISPs phone is busy.

/jnos/stop.ppp (the disconnect script)

I have used the 'stop.ppp' file to close a dialup connection to the Internet. This script informs all users using the system that it will disconnect in 5 minutes, pauses 4 minutes, informs the users that it will disconnect in 1 minute, pauses 1 minute, informs the users it will disconnect now, then it issues the JNOS 'dialer' command to disconnect from the Internet. The 'dialer' program uses a file I generated named 'logout.net' that contains the dialer commands. Then this script drops the IP address on the PPP link, drops the domain name servers defined in 'start.ppp', drops the attempts to download my email from my ISP, and schedules another disconnect sequence tomorrow at the same time.

/jnos/logout.net (the disconnect dialer script)

This script is a dialer script invoked by JNOS's 'dialer' command from the '/jnos/stop.ppp' file when it is time to disconnect from the Internet. It contains all the commands necessary to instruct the 'dialer' program to talk to the modem to disconnect from the ISP.



SUPPORTING PACKET RADIO MESSAGES AND INTERNET EMAIL

I offer a dual service BBS where the system can handle both packet radio messages and Internet email messages. Messages both of a personal nature as well as bulletins are taken care of. I routinely collect bulletins from other BBS sysops and direct them to a number of different categories. These files define what is considered a packet message verses an Internet message, what mail areas are defined, how to maintain the saved messages, as well as how to forward the packet radio messages to other BBS sysops.

/jnos/spool/areas

All the public mail areas are defined in this file, one on each line. Only the first word on each line is the actual mail area name. The rest of the information on each line is a description of each mail area.

/jnos/spool/rewrite

A complex set of instructions that instruct JNOS what to do with each message received by the system or sent by a user. This file is responsible for determining if a message is an Internet email message or a packet radio message and handling it appropriately. It is also used to reject messages to specific addresses that either I don't support locally or would not rather not have on my system.

/jnos/spool/expire.dat

A list of mail areas that should have messages removed that are older than the number of days listed in this file. Keeps the system from consuming all the hard disk space available.

/jnos/spool/forward.bbs

Each entry in this file is divided by a line containing only hyphens "-". Each entry contains the commands necessary to connect to another BBS in order to forward messages from here to that BBS. Each entry contains what mail areas are to be forwarded as well as when forwarding should occur to that BBS. The last entry in this file writes received bulletins to a file for other BBS sysops to FTP from the kf9ug.centralnet.net server.

/jnos/pollbbs

Some of my forwarding partners require that I poll their system to force them to send me bulletins. All such forwarding partners are listed in this file and this file is executed periodically via the JNOS "AT" command.



KEEPING THE SYSTEM RUNNING SMOOTH

I have supplied my system with a couple of scripts that run periodically to clean up various data files and to make sure my TNCs stay in kiss mode.

/jnos/cleanup

This script schedules itself to run again tomorrow at the same time, expires all BIDs in the '/jnos/spool/history' file, and forces JNOS to reindex all mail areas.

/jnos/kiss

This script sends appropriate commands to a TNC I use that tends to drop out of KISS mode on its own. It runs periodically every three hours to force the TNC back into KISS mode in case it has dropped out to standard AX.25 mode. (MFJ-1270C)



GW.KF9UG.AMPR.ORG's CONFIGURATION FILES

The configuration files listed below reflects a typical Linux system that supports a dialup connection to the Internet as well as forwarding to other BBS's over the RF ports and the Internet. NOTE THAT SINCE GW.KF9UG.AMPR.ORG no longer uses a dialup connection to the Internet, these files do not reflect how the system is currently configured. Some of the files have been edited to leave out sensitive personal information like logins, passwords, etc.

These files have not been updated since the HF port has been configured into FWARig's main computer, gw.kf9ug.ampr.org. See the configuration files for the old kf9ug.ampr.org system for these settings.

Unix /etc/inittab 10/21/97
File run by Unix on reboot that calls startnos

JNOS startup batch file: startnos 10/21/97
Called by /etc/inittab
Reflects dialup startup sequence.

C program source code for 'iftime' command I wrote 10/21/97

autoexec.nos file 6/11/98
Called when system is started when it should NOT be online to the Internet

hostname.nos file 6/11/98
Called by autoexec.nos to setup host specific information

autoexec.ppp file 6/11/98
Called when system is started when it should be online to the Internet

onexit.nos file 10/21/97
Called when JNOS exits gracefully

central.net file 10/21/97
Called from start.ppp file when logging into the Internet

cleanup file 10/21/97
Called as a command that is executed periodically via the "at" command as defined in the "autoexec.nos" file.

kiss file 10/21/97
Called as a command that is executed periodically via the "at" command as defined in the "autoexec.nos" file.

pollbbs file 10/21/97
Called as a command that is executed periodically via the "at" command as defined in the "autoexec.nos" file.

start.ppp file 6/11/98
Called as a command that is executed when the system connects to the Internet via the "at" command as defined in the "autoexec.nos" file.

stop.ppp file 6/11/98
Called as a command that is executed when the system disconnects from the Internet via the "at" command as defined in the "autoexec.nos" file.

spool/access.www file 6/11/98
Used by JNOS to determine who can access JNOS's built in webpage server.

spool/areas file 6/11/98
Defines what public mail areas are available.

spool/expire.dat file 6/11/98
Defines when old messages should be purged from the mail areas.

spool/forward.bbs file 6/11/98
Defines what BBS's to forward messages as well as when and what mail areas to forward.

spool/rewrite file 6/11/98
Defines complex addressing rules that tell JNOS what to do with incoming mail messages.

zipem file 6/11/98
PKZIPs forwarding files for others to download from the kf9ug.centralnet.net FTP site.

spool/user.dat file 4/15/97
A snapshot of the users that have connected to the system in the file format used by JNOS.



Go Back to FWARig Configuration

Number of times this page has been
accessed since February 1, 1998

Last updated May 23, 2000