Mgetty & AutoPPP Last updated: 2021.12.05

Overview

Windows 95

Dialing into Linux with Windows 95

The mgetty configuration outlined here is valid for the following system:

Should any of the above links fail for whatever reason, the best place for beginning your search would be either John Taylor’s Bleeding Edge Linux, or Bill Latura’s Linux Applications.

Gert Doering, author of mgetty+sendfax, has made available his instructions on the sendfax portion of mgetty+sendfax. You may find it at theory.uwinnipeg.ca/localfiles/infofiles/mgetty.html.

Assumptions

Linux kernel with PPP support. Enabling such support is beyond the scope of this document. (Infoseek < ‘pppd | Linux’ = 786 possible sources for support.)

Install PPP

Download the latest PPP daemon source. Follow the included build directions; they are well written and you should have no trouble. If you are using the shadow password package, build using:

make HAS_SHADOW=1

It may be necessary to edit line 54 of .../ppp-2.2.0f/pppd/auth.c and provide the correct path to the pwauth.h file from the shadow suite. If you use the in-a-box package, it may be found in .../shadow-ina-box-1.2/shadow-96xxxx/pwauth.h.

Configure Mgetty

Mgetty is an excellent program from Gert Doering. Capable of far more than simply Auto_PPP. Obtain it from one of the sites listed above (you should have version 0.99x or higher) and unpack as you desire.

Be sure you are reading the instructions for all these packages. policy.h should be tuned for your system. Somewhere around line 99, for instance, you’d probably check on:

define DEVICE_GROUP "modem"

(The defined group must exist, i.e., groupadd -g 800 modem.)

Then, in the vicinity of line 276 you may want:

define DEFAULT_PORTSPEED 115200

In line 297 will appear something like the following for a Cardinal 33.6. (USR 28.8 responds well to the same string):

define MODEM_INIT_STRING "ATE1V1Q0&S0&D2&C1S0=0S13=1"

(Other modems may need only ATE1V1Q0&D2&C1S0=0. Mgetty responds to the RING of the modem, so S0=1 is not needed.)

Next, you will need to make one edit on, or near line 110 of the Makefile. It should look like this:

CFLAGS=-02 -Wall -pipe -DAUTO_PPP

Now, build according to the instructions.

make
make testdisk
make install

You’ll next want to edit the login.config file in the /etc/mgetty+sendfax directory of your chosen installation path. Comment out line 42 (assuming you don’t want FIDO), and edit line 50, or somewhere thereabouts, as follows:

/AutoPPP/ - - /usr/sbin/pppd auth login +pap -chap modem crtscts proxyarp lock

Remove the proxyarp option if you’re using a standalone server or want you dial-up users to remain local.

Note: The second “-” causes the users login name to appear in utmp/wtmp.

Edit your /etc/inittab file to reflect you hardware. Utilizing 8 ports of a Cyclades Cyclom board would look as follows:

s0:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC0
s1:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC1
s2:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC2
s3:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC3
s4:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC4
s5:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC5
s6:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC6
s7:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyC7

However, using a modem attached to a standard serial interface, I needed the following under Slackware:

s0:45:respawn:/usr/local/sbin/mgetty -D -x2 -R 45 /dev/ttyS0
s1:45:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyS1

The -R 45 is optional. Mgetty is designed to allow you to use your voice line to also handle dial-up connections. With -R xx enabled, a caller simply needs to call once, hangup; then call again within xx seconds. Mgetty will ignore the first call, then respond promptly to the second (refer to the manual). If you have problems using :23: as a run-level (i.e., everything seems fine, but the modem doesn’t pick-up), try :45:.

You must provide the correct path to your mgetty executable; for example, /usr/sbin/mgetty or /usr/local/sbin/mgetty.

Do a kill -1 1. You should see your modem(s) initialize.

Try dialing in from a remote machine. If the modem answers, then mgetty works. If your modem answers, its very unlikely that any additional problems are related to mgetty, assuming you have a modem that supports 115200.

Configure PPPD

You’ll want to use pppd as the login shell for the account established to handle dial-ins. Your /etc/passwd file should look something like:

pppuser:*:xxx:800:PPP Dialup:/users1/ppp/pppuser:/usr/sbin/pppd

You’ll now need to get the various /etc/ppp/options files correct. I have my system configured to dial out using pppd as well as receive incoming calls. I have the relevant pppd files configured similar to the following.

/etc/ppp/options
    -detach
/etc/ppp/options/ttyCx (Cyclades ports)
    199.177.27.2:199.177.27.50

OR

/etc/ppp/options.ttyS0 (for serial ports)
    199.177.27.2:199.177.27.3

Rename or remove pap-secrets and try dialing in again from a Windows 95 machine. (There is some controversy on pap-secrets file. Al Longyear, however, says remove it, and I removed it. Logins are flawless: every time.

The Windows 95 box need only create a new connection. Add the phone number, login name / password, and everything should go fine.

Additional Notes

Regarding pop mail for Windows 95 clients after they’re connected - Tim Sailer wrote a patch for qpopper. It can be found at www.buoy.com/isp/ along with a collection of helpful tools and scripts written or collected by Tim Sailer. You will also find additional information regarding mgetty.

Should you be having modem problems, or are having problems defining the correct /etc/inittab entry, I suggest you read Greg Hankins' Linux Serial HOWTO. It is a valuable reference.

Tim Sailer also provides an excellent solution for setting up dynamic IP addressing.

Mgetty, (as you’ve certainly read by now;), is capable of far more than AutoPPP. It handles both fax and voice, and is being actively developed by a dedicated team.

Version 2.2.0f of pppd is stable and is covered by a broad number of websites.