#define DEVICE_GROUP "modem" (/etc/groupにmodemグループを作成しておきます) #define DEFAULT_PORTSPEED 115200 #define MODEM_INIT_STRING "ATZ" |
CFLAGS=-O2 -Wall -pipe -DAUTO_PPP
make make testdisk make install
# Serial lines #s1:12345:respawn:/sbin/agetty 19200 ttyS0 vt100 #s2:12345:respawn:/sbin/agetty 19200 ttyS1 vt100 s2:345:respawn:/usr/local/sbin/mgetty -D -x2 /dev/ttyS1 |
# SAMPLES: # Use this one with my Taylor-UUCP and Taylor-UUCP passwd files. # (Big advantage: tuucp can use the same passwd file for serial dial-in # and tcp dial-in [uucico running as in.uucpd]). Works from 1.05 up. # #U* uucp @ /usr/lib/uucp/uucico -l -u @ # # Use this one for fido calls (login name /FIDO/ is handled specially) # # You need Eugene Crosser's "ifmail" package for this to work. # mgetty has to be compiled with "-DFIDO", otherwise a fido call won't # be detected. # #/FIDO/ uucp fido /usr/local/lib/fnet/ifcico @ # # Automatic PPP startup on receipt of LCP configure request. # mgetty has to be compiled with "-DAUTO_PPP" for this to work. # Warning: Case is significant, AUTOPPP or autoppp won't work! # Consult the "pppd" man page to find pppd options that work for you. # /AutoPPP/ - - /usr/sbin/pppd auth +pap login debug modem crtscts lock 192.168.1.100:192.168.1.101 クライアントにPAP認証に答えるように強制します。認証ファイルは/etc/passwdを使用します。 # # # An example where no login name in the argument list is desired: # automatically telnetting to machine "smarty" for a given login name # #telnet-smarty gast telnet /usr/bin/telnet -8 smarty # # This is the "standard" behaviour - *dont* set a userid or utmp # entry here, otherwise /bin/login will fail! # This entry isn't really necessary: if it's missing, the built-in # default will do exactly this. # * - - /bin/login @ |
ppp:password:uid:gid:ppp client:/tmp:/etc/ppp/ppp-server |
#!/bin/sh # # login shell for ppp user # LOCAL_IP=192.168.1.100 <---このIPアドレスはマシン環境に合わせて REMOTE_IP=192.168.1.101 変更してください exec /usr/sbin/pppd passive debug modem lock crtscts $LOCAL_IP:$REMOTE_IP |
# Secrets for authentication using PAP # client server secret [IP address] ppp * password <---- /etc/passwdの設定に同じ受信したデータがpppパケットでない場合には"login"プロンプトに続くログインプロセスを実行します。 アクセスしたユーザーがpppのユーザー名でログインに成功すると/etc/ppp/ppp-serverが起動され,以降PPPでの通信が可能となります。
TELEPHONE=078-XXX-XXXX <--- サーバー側の電話番号 ACCOUNT=ppp <--- ユーザー名は ppp とする LOCAL_IP=0.0.0.0 REMOTE_IP=0.0.0.0 NETMASK=255.255.255.0 export TELEPHONE ACCOUNT DIALER_SCRIPT=/etc/ppp/ppp-on-dialer exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS1 38400 \ asyncmap 0 $LOCAL_IP:$REMOTE_IP \ noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT \ name $ACCOUNT |
#!/bin/sh exec chat -v \ TIMEOUT 3 \ ABORT '\nBUSY\r' \ ABORT '\nNO ANSWER\r' \ ABORT '\nRING\r\n\r\nRING\r' \ '' \\rATZ \ 'OK-+++\c-OK' ATH0 \ TIMEOUT 60 \ OK ATDT$TELEPHONE \ <-- パルスダイヤルならATDP CONNECT '' |
# Secrets for authentication using PAP # client server secret [IP address] ppp * password <---- サーバー側の/etc/passwdの設定に同じ |