On Fri, 20 Feb 1998, Aghart wrote:
> Entering PPP mode..... ( kalau saya masukkan ppp )
> Entering SLIP mode.... ( kalau saya masukkan ke slip )
> dsb....
> lalu putus......
>
> kenapa ya ??
Bagaimana kalau kita gunakan cara lain?
Di Linux saya (Slakware 3.2 Kernel 2.0.33 upgrade) ada file-file berikut:
1. /usr/sbin/ppp-on
2. /usr/sbin/ppp-off
3. /etc/ppp/ppp-on-dialer
Jika anda punya file tsb (ppp-on, ppp-off, ppp-on-dialer) kita bisa
lanjutkan, kalau tidak anda bisa buat sendiri :)
OK ... to the script then ... BTW ... you must be root to do this :)
1. ppp-on: edit bagian TELEPHONE, ACCOUNT, PASSWORD (dibagian awal script)
dan edit /dev/ttyS? dan speed (dibagian akhir script),
/dev/ttyS0 = COM1, /dev/ttsS1 = COM2 dst (di mesin saya /dev/ttyS3)
speed dimesin saya diset 115200.
Yang lainnya biarkan (jangan diganti)
----------------------- begin ppp-on script --------------------------
#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command. However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=666666 # Ganti dengan nomor telp. dial up anda.
ACCOUNT=aghart # Ganti dengan loginname anda mis: aghart
PASSWORD=4gh4r7 # Ganti dengan password anda mis: 4gh4r7
LOCAL_IP=0.0.0.0 # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0 # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0 # The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
#
# This is the location of the script which dials the phone and logs
# in. Please use the absolute file name as the $PATH variable is not
# used on the connect option. (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
# Initiate the connection
#
# I put most of the common options on this command. Please, don't
# forget the 'lock' option or some programs such as mgetty will not
# work. The asyncmap and escape will permit the PPP link to work with
# a telnet or rlogin connection. You are welcome to make any changes
# as desired. Don't use the 'defaultroute' option if you currently
# have a default route to an ethernet gateway.
#
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS3 115200 \
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
------------------------ end ppp-on script ---------------------------
2. ppp-off tidak perlu diedit/diutak-atik, isinya sbb:
----------------------- begin ppp-off script -------------------------
#!/bin/sh
######################################################################
#
# Determine the device to be terminated.
#
if [ "$1" = "" ]; then
DEVICE=ppp0
else
DEVICE=$1
fi
######################################################################
#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
kill -INT `cat /var/run/$DEVICE.pid`
#
# If the kill did not work then there is no process running for this
# pid. It may also mean that the lock file will be left. You may wish
# to delete the lock file at the same time.
if [ ! "$?" = "0" ]; then
rm -f /var/run/$DEVICE.pid
echo "ERROR: Removed stale pid file"
exit 1
fi
#
# Success. Let pppd clean up its own junk.
echo "PPP link to $DEVICE terminated."
exit 0
fi
#
# The ppp process is not running for ppp0
echo "ERROR: PPP link is not active on $DEVICE"
exit 1
----------------------- end ppp-off script ------------------------
3. ppp-on-dialer:
Bentuk asli dari dua (2) baris terakhir adalah:
ogin:--ogin: $ACCOUNT \
assword: $PASSWORD
Tapi karena beberapa provider saya mempunyai standar login sbb:
login :
password :
(Perhatikan ada spasi sesudah login dan password), thus tidak bisa
didetect ppp-on-dialer, jadi saya mencoba bentuk
:--: $ACCOUNT \
: $PASSWORD
Dan sampai sekarang tidak ada masalah (utk semua provider saya).
------------------- begin ppp-on-dialer script -------------------
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec chat -v \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
TIMEOUT 30 \
OK ATDT$TELEPHONE \
CONNECT '' \
:--: $ACCOUNT \
: $PASSWORD
-------------------- end ppp-on-dialer script --------------------
4. Oya untuk ngintip hasilnya coba:
tail -f /var/adm/messages
atau anda bisa bikin script yg isinya:
#!/bin/sh
exec tail -f /var/adm/messages
beri nama misalnya ppplog, whatever you want, kemudian chmod +x ppplog
CyberBug
[member of kecoak elektronik]
-
STOP-LANGGANAN: 'unsubscribe' ke: [EMAIL PROTECTED]
START-LANGGANAN: 'subscribe' ke: [EMAIL PROTECTED]