; 4:00 PM 7/17/98 set trace on user root myrupedit *:21 command ; Configure uplink parameters packet eth0 0x60 * dhcp ; route * uplink mmm.nnn.ooo.2 ; rip uplink quiet ; Configure Dialin Ports ; To use an IRQ per Port change the "15" below to ; the appropriate IRQ for each port async sl0 0x3f8 4 115200 do_dialin telnetd do_telnet exit ; Telnet login script do_telnet: on cdloss drop_telnet wait .5 on timeout drop_telnet send "\r\nlogin: " set echo on read 60 "\r\n" NAME send "\r\nPassword:" set echo off read 60 "\r\n" PASS authenticate NAME PASS *:21 log "$NAME logged in from $IPADDR:$PORT" send "\r\n\n" command drop_telnet: exit ; PPP script for dial-in ports using XIRCOM MPM-8 ; All ports are configured with some common values ; PAP authentication ; 900 second idle timeout ; modem init strings, etc. do_dialin: set ppp sl0 remote ip 192.168.5.68 route 192.168.5.68/32 sl0 set trace on set log raw on set ppp trace on ; change as appropriate for chap authentication set ppp authenticate pap set ppp sl0 login ; sets dialin idle time to 15 minutes define myidle "900" define myip "192.168.5.67" ; setup standard values for the modem(s) - these are ; for the XIRCOM MPM-8 modem - change as needed define mdm_answer "ATA\r" define mdm_reset "ATZ\r" define mdm_config "ATL0E0V1&C1&D2\r" define mdm_connect "CONNECT" define mdm_ring "RING" define mdm_ok "OK" hangup_dialin: set interface dtr off wait 1 set interface dtr on wait 1 set interface rts flow wait .5 send "$mdm_reset" wait 1 "$mdm_ok" send "$mdm_config" wait 1 "$mdm_ok" ; The XIRCOM apparently does not support autoanswer ; so the scripts sit waiting for "RING" - the board ; does support the RI signal so it should work with ; a "on RING answer_dialin" command instead. In any ; event the script sends the Answer command to the ; modem when it gets a ringing indication. If it fails ; to get CONNECT in 30 seconds it hangs up. If it gets ; a CD signal then it proceeds to validate the user ; Wait for the "RING" message from the modem ; wait 0 "$mdm_ring" ; Alternate ringing indication with modem RI signal on ring answer_dialin answer_dialin: send "$mdm_answer" on timeout hangup_dialin wait 30 "$mdm_connect" on cd continue wait 0 continue: on cdloss hangup_dialin on timeout hangup_dialin ppp sl0 $myidle $myip goto hangup_dialin