lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | This directory contains a set of scripts which have been used on Linux |
| 2 | as well as Solaris 2.x systems to initiate or maintain a connection |
| 3 | with PPP. The files in this directory were contributed by Al Longyear |
| 4 | (longyear@netcom.com) and Adi Masputra (adi.masputra@sun.com) |
| 5 | |
| 6 | ------------------------------------------------------------------------ |
| 7 | |
| 8 | 1. README |
| 9 | |
| 10 | This file. You are reading it. It is just documentation. |
| 11 | |
| 12 | ------------------------------------------------------------------------ |
| 13 | |
| 14 | 2. ppp-on |
| 15 | |
| 16 | This script will initiate a connection to the PPP system. It will run |
| 17 | the chat program with the connection script as a parameter. This is a |
| 18 | possible security hole. However, it is simple. It is meant to replace |
| 19 | the previous version of ppp-on which was not very functional. |
| 20 | |
| 21 | The ppp-on script has entries for the account name, password, IP |
| 22 | addresses, and telephone numbers. The parameters are passed to the |
| 23 | pppd process and, then in turn, to the second part of the connect |
| 24 | script, as a set of environment variables. |
| 25 | |
| 26 | Please make sure that you put the full path name to the ppp-on-dialer |
| 27 | script in the reference to it in ppp-on. |
| 28 | |
| 29 | ------------------------------------------------------------------------ |
| 30 | |
| 31 | 3. ppp-on-dialer |
| 32 | |
| 33 | This is the second part to the simple calling script, ppp-on. It |
| 34 | executes the chat program to connect the user with a standard UNIX |
| 35 | style getty/login connection sequence. |
| 36 | |
| 37 | ------------------------------------------------------------------------ |
| 38 | |
| 39 | 4. callback |
| 40 | |
| 41 | This script may be used in lieu of the ppp-on-dialer to permit the |
| 42 | common modem callback sequence. You may need to make changes to the |
| 43 | expected prompt string for the modem. |
| 44 | |
| 45 | The script works by disabling the system's detection of the DCD |
| 46 | condition and working on the modem status message "NO CARRIER" which |
| 47 | is generated when the modem disconnects. |
| 48 | |
| 49 | It is crude. It does work for my modem connection. Use as you see fit. |
| 50 | |
| 51 | ------------------------------------------------------------------------ |
| 52 | |
| 53 | 5. redialer |
| 54 | |
| 55 | The redialer script is a replacement for the ppp-on-dialer script. It |
| 56 | will do 'attack dialing' or 'demon dialing' of one or more telephone |
| 57 | numbers. The first number which responds will be used for a |
| 58 | connection. |
| 59 | |
| 60 | There is a limit of ten attempts and a 15 second delay between dialing |
| 61 | attempts. Both values are set in the script. |
| 62 | |
| 63 | ------------------------------------------------------------------------ |
| 64 | |
| 65 | 6. ppp-off |
| 66 | |
| 67 | This is a script which will terminate the active ppp connection. Use |
| 68 | as either "ppp-off" to terminate ppp0, or "ppp-off <device>" to |
| 69 | terminate the connection on <device>. For example, "ppp-off ppp2" will |
| 70 | terminate the ppp2 connection. |
| 71 | |
| 72 | ------------------------------------------------------------------------ |
| 73 | |
| 74 | 7. secure-card |
| 75 | |
| 76 | This script was written by Jim Isaacson <jcisaac@crl.com>. It is a script |
| 77 | for the 'expect' programming language used with Tcl. You need to have |
| 78 | expect and Tcl installed before this script may be used. |
| 79 | |
| 80 | This script will operate with a device marketed under the name "SecureCARD". |
| 81 | This little device is mated with its controller. On the credit card size |
| 82 | device, there is a sequence number which changes on a random basis. In order |
| 83 | for you to connect you need to enter a fixed portion of your account name |
| 84 | and the number which is displayed on this card device. The number must match |
| 85 | the value at the controller in order for the account name to be used. |
| 86 | |
| 87 | The problem is that chat uses fixed response strings. In addition, the |
| 88 | timing for running the script may prevent the use of a script that reads the |
| 89 | value before it starts the dial sequence. What was needed was a script which |
| 90 | asked the user at the user's console at the time that it is needed. |
| 91 | |
| 92 | This led to the use of expect. |
| 93 | |
| 94 | ------------------------------------------------------------------------ |
| 95 | |
| 96 | 8. ppp-on-rsh |
| 97 | |
| 98 | This script will initiate a PPP connection to a remote machine using rsh. |
| 99 | This is implemented by creating a master/slave pseudo-tty with the slave |
| 100 | pointing to rsh, specifically with the 'pty' and 'notty' options of pppd. |
| 101 | It is assumed that the remote machine contains some sort of trust |
| 102 | mechanisms (such as ~/.rhosts, et al) to allow the local machine to |
| 103 | connect via rsh as root. |
| 104 | |
| 105 | ------------------------------------------------------------------------ |
| 106 | |
| 107 | 9. ppp-on-ssh |
| 108 | |
| 109 | This script will initiate a PPP connection to a remote machine using the |
| 110 | secure shell, or ssh. I've only tested this on ssh 1.x, so those of you |
| 111 | who are running ssh 2.x mahy need to modify the ssh options slightly. |
| 112 | This is implemented by creating a master/slave pseudo-ttyt with the slave |
| 113 | pointing to ssh, specifically with the 'pty' and 'notty' options of pppd. |
| 114 | It is assumed that the remote machine can accept the ssh connection from |
| 115 | the local host, in the sense that all ssh authentication mechanisms have |
| 116 | been properly configured, so that a remote root user can open a ssh |
| 117 | connection. |
| 118 | |
| 119 | ------------------------------------------------------------------------ |
| 120 | |
| 121 | 10. options-rsh-loc & options-rsh-rem |
| 122 | |
| 123 | These options files accompany the ppp-on-rsh script mentioned above. In |
| 124 | theory, you'd want to copy the options-rsh-rem to the remote machine where |
| 125 | in.rshd is running. The only extra option required on the remote machine |
| 126 | options file is the 'notty' option. In addition, all ASCII control characters |
| 127 | [0x00 to 0x1f], plus 0xff, are escaped. This may need to be modified |
| 128 | depending on the rsh (or pseudo-tty) implementation which may differ across |
| 129 | platforms, for further optimizations. |
| 130 | |
| 131 | ------------------------------------------------------------------------ |
| 132 | |
| 133 | 11. options-ssh-loc & options-ssh-rem |
| 134 | |
| 135 | These options files accompany the ppp-on-ssh script mentioned above. I've |
| 136 | only tested this on ssh 1.x, so those of you who are running ssh 2.x need |
| 137 | to modify the ssh options slightly. In theory, you'd want to copy the |
| 138 | options-ssh-rem to the remote machine where sshd daemon is running. The only |
| 139 | extra options required on the remote machine options file is the 'notty' |
| 140 | option. In addition, all ASCII control characters [0x00 to 0x1f], plus 0xff, |
| 141 | are escaped. This may need to be modified depending on the ssh (or |
| 142 | pseudo-tty) implementation which may differ across platforms, for further |
| 143 | optimizations. |