[Tech] configurazione manuale della connessione ad Internet

Francesco Poli e-frx@libero.it
Gio 9 Nov 2000 00:15:01 CET


Interessanti sviluppi: ho fatto qualche modifica
agli script ed ai file di configurazione
grazie ai vostri suggerimenti e a qualche occhiata
agli Appunti di informatica libera (grande Daniele
Giacomini!).
Credo sia il caso che legga piu' attentamente
la parte relativa alle connessioni PPP sugli
Appunti di informatica libera...  ^__^



Ricapitolando:
Ho creato il seguente link simbolico

     ln -s /dev/ttyS1 /dev/modem

Ho editato i file

# /etc/resolv.conf (anche se e' inutile)

search libero.it
nameserver 195.210.91.1
nameserver 195.210.91.2

# /etc/ppp/options

/dev/modem
57600
debug
lock
crtscts
defaultroute
mtu 552
mru 552

# /etc/ppp/pap-secrets

<mio_username>@libero.it * <mia_password>

# /etc/modules.conf

alias char-major-108 ppp

# /usr/local/bin/Libero_up

#!/bin/bash

# dialup connection starting script

if `/sbin/ifconfig | grep "ppp0" > /dev/null`
then
 echo "PPP connection already active"
 exit 1
fi

TEL_NUM="0553801010"
USERNAME="e-frx"
/usr/sbin/pppd \
connect "/usr/sbin/chat -v   \
TIMEOUT    3                 \
ABORT      BUSY              \
ABORT      'NO CARRIER'      \
''         \\dATZ            \
OK         \\dATX3           \
OK         \dAT              \
OK         '\dATDT $TEL_NUM' \
TIMEOUT    60                \
CONNECT    ''"               \
user       $USERNAME -d      \
-detach &

# /usr/local/bin/Libero_down

#!/bin/sh

# dialup connection stopping script

DEVICE=ppp0

kill -INT `cat /var/run/$DEVICE.pid`

echo "$DEVICE terminated !!"


Ho cambiato i permessi ed il gruppo proprietario ai file

-rwsr-xr--   1 root     pppusers      128 Nov  1 23:35 /usr/local/bin/Libero_down*
-rwsr-xr--   1 root     pppusers      279 Nov  2 00:06 /usr/local/bin/Libero_up*
-rwsr-xr--   1 root     pppusers   138596 Sep 20  1999 /usr/sbin/pppd*


Ed ecco cosa ottengo *ora* in /var/log/messages lanciando Libero_up

Nov  8 23:38:46 neverland pppd[708]: pppd 2.3.10 started by FRX, uid 500
Nov  8 23:38:47 neverland chat[710]: timeout set to 3 seconds
Nov  8 23:38:47 neverland chat[710]: abort on (BUSY)
Nov  8 23:38:47 neverland chat[710]: abort on (NO CARRIER)
Nov  8 23:38:47 neverland chat[710]: send (dATZ^M)
Nov  8 23:38:47 neverland chat[710]: expect (OK)
Nov  8 23:38:47 neverland chat[710]: dATZ^M^M
Nov  8 23:38:47 neverland chat[710]: OK
Nov  8 23:38:47 neverland chat[710]:  -- got it 
Nov  8 23:38:47 neverland chat[710]: send (dATX3^M)
Nov  8 23:38:47 neverland chat[710]: expect (OK)
Nov  8 23:38:47 neverland chat[710]: ^M
Nov  8 23:38:47 neverland chat[710]: dATX3^M^M
Nov  8 23:38:47 neverland chat[710]: OK
Nov  8 23:38:47 neverland chat[710]:  -- got it 
Nov  8 23:38:47 neverland chat[710]: send (dAT^M)
Nov  8 23:38:47 neverland chat[710]: expect (OK)
Nov  8 23:38:47 neverland chat[710]: ^M
Nov  8 23:38:48 neverland chat[710]: dAT^M^M
Nov  8 23:38:48 neverland chat[710]: OK
Nov  8 23:38:48 neverland chat[710]:  -- got it 
Nov  8 23:38:48 neverland chat[710]: send (\dATDT 0553801010^M)
Nov  8 23:38:49 neverland chat[710]: timeout set to 60 seconds
Nov  8 23:38:49 neverland chat[710]: expect (CONNECT)
Nov  8 23:38:49 neverland chat[710]: ^M
Nov  8 23:39:16 neverland chat[710]: ATDT 0553801010^M^M
Nov  8 23:39:16 neverland chat[710]: CONNECT
Nov  8 23:39:16 neverland chat[710]:  -- got it 
Nov  8 23:39:16 neverland chat[710]: send (^M)
Nov  8 23:39:16 neverland pppd[708]: Serial connection established.
Nov  8 23:39:16 neverland pppd[708]: Using interface ppp0
Nov  8 23:39:16 neverland pppd[708]: Connect: ppp0 <--> /dev/modem
Nov  8 23:39:21 neverland pppd[708]: Modem hangup
Nov  8 23:39:21 neverland pppd[708]: Connection terminated.
Nov  8 23:39:22 neverland pppd[708]: Exit.



Cosa significa "Modem hangup"? Si e' piantato il modem?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Francesco Poli         e-frx@arnone.de.unifi.it
    e-frx@libero.it        frxfrx@tiscalinet.it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Non vorrei aver fatto un grave cervello al mio danno!"
                                         - Homer J. Simpson





Maggiori informazioni sulla lista flug-tech