Message-ID: Sender: Pierre.Etchemaite@inlandsys.com Date: Wed, 11 Jun 1997 19:13:05 +0200 (MET DST) Voici (j'espère) tous les fichiers que j'ai dû modifier pour me connecter à mon fournisseur d'accès INSAT (ex ICARE), à Mérignac (Bordeaux). La configuration complète est en fait beaucoup plus complexe, car cette machine sert à connecter un petit réseau local à l'Internet; La machine fait donc aussi office de : - serveur de noms - serveur de mail (sendmail grâce au kit de Jussieu, plus fetchmail) - serveur de news (leafnode) - routeur-masqueur (IP-masquerading) - filtreur de paquets - proxy-cache web, ftp et gopher (squid) - ... C'est dur de me mettre que le strict nécessaire, car les scripts sont tellement imbriqués les uns dans les autres :( Par exemple, dans un script "chat", on trouve aussi bien des chaînes d'initialisation du modem, le numéro de téléphone du fournisseur et le mot de passe de l'accompte pour icelui... Certains fichiers de configuration sont donc sans doute plus compliqués que ce qui serait réellement scrictement nécessaire pour une machine seule. J'ai intentionnellement laissé quasiment intacts certains fichiers de configuration (notamment /etc/ppp/ip-up) comme exemple de ce que l'on peut faire (ou de ce qu'il faut éviter) :) Je suis bien entendu ouvert à toute requête s'il manque des fichiers, ou si des explications sont nécessaires sur certains détails. Configuration matérielle: - Modem US Robotics Sportster 33,6Kb sur /dev/ttyS1 ("COM2:"), contrôleur série compatible 16550A Configuration logicielle: - Slackware, mise à jour "à la main" - Linux 2.0.31p2 (kerneld) - ppp 2.3b3 - mgetty 1.1.1 (sans AutoPPP, un jour peut-être...) - irqtune 0.3 -------- /usr/src/linux/.config (partiel) --------------------------------- CONFIG_EXPERIMENTAL=y CONFIG_MODULES=y # CONFIG_MODVERSIONS is not set CONFIG_KERNELD=y CONFIG_NET=y CONFIG_FIREWALL=y CONFIG_NET_ALIAS=y CONFIG_INET=y CONFIG_IP_FORWARD=y # CONFIG_IP_MULTICAST is not set CONFIG_SYN_COOKIES=y CONFIG_RST_COOKIES=y CONFIG_IP_FIREWALL=y CONFIG_IP_FIREWALL_VERBOSE=y CONFIG_IP_MASQUERADE=y CONFIG_IP_MASQUERADE_IPAUTOFW=y CONFIG_IP_MASQUERADE_ICMP=y # CONFIG_IP_TRANSPARENT_PROXY is not set CONFIG_IP_ALWAYS_DEFRAG=y CONFIG_IP_ACCT=y # CONFIG_IP_ROUTER is not set CONFIG_NET_IPIP=m CONFIG_IP_ALIAS=m # CONFIG_INET_PCTCP is not set # CONFIG_INET_RARP is not set # CONFIG_NO_PATH_MTU_DISCOVERY is not set CONFIG_IP_NOSR=y CONFIG_SKB_LARGE=y CONFIG_NETDEVICES=y CONFIG_DUMMY=m # CONFIG_EQUALIZER is not set # CONFIG_DLCI is not set # CONFIG_PLIP is not set CONFIG_PPP=m # CONFIG_SLIP is not set # CONFIG_ISDN is not set CONFIG_SERIAL=m -------- /etc/rc.d/rc.serial ----------------------------------------------- .. ${SETSERIAL} /dev/cua1 uart 16550A port 0x2F8 irq 3 .. /bin/stty crtscts &1 | mail -s "PPP session debriefing" root & -------- /etc/ppp/ip-down ------------------------------------------------- #!/bin/sh echo PPP is shutting down! | wall date rm -f /tmp/.internet killall fetchmail -------- /etc/ppp/dial-insat ---------------------------------------------- ABORT 'ERROR' ABORT 'NO DIALTONE' ABORT 'NO ANSWER' ABORT 'BUSY' ABORT 'NO CARRIER' TIMEOUT 5 '' AT OK 'AT &F1 E0 V1 &C1 &D2 Q0 S0=0 &B1 &A3' OK 'ATS7=60S19=0L0M1&M4&K1&H1&R2&I0B0X4' OK ATDT0556479478 TIMEOUT 45 'CONNECT 28800/ARQ/V34/LAPM/V42BIS' '\d\d' TIMEOUT 10 '' '' '' '' Userid:--Userid:-BREAK-Userid: myuserid ssword? '\qmypasswd' '' ppp -------- /usr/bin/pppconnect --------------------------------------------- #!/bin/sh # Appel Standard #DEBUG=yes DEVICE=/dev/ttyS1 DIAL_SCRIPT=/etc/ppp/dial-insat stty -tostop -echo < $DEVICE > $DEVICE exec /usr/sbin/pppd $DEVICE connect "/usr/sbin/chat ${DEBUG:+-v} -f $DIAL_SCRIPT" ${DEBUG:+debug} -------- /usr/bin/pppdeconnect ------------------------------------------- #!/bin/sh DEVICE=ppp0 killall chat # # 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 unsuccessful, ensure that the pid file is removed. # if [ ! "$?" = "0" ]; then echo "removing stale $DEVICE pid file." rm -f /var/run/$DEVICE.pid exit 1 fi # # Success. Terminate with proper status. # echo "$DEVICE link terminated" exit 0 fi # # The link is not active # echo "$DEVICE link is not active" exit 1 Et pour ceux qui voudraient recevoir les appels entrants: -------- /etc/passwd ----------------------------------------------------- .. ppp::410:14:Public PPP Account:/home/ppp:/etc/ppp/ppplogin .. -------- /etc/ppp/ppplogin ----------------------------------------------- #!/bin/sh # ppplogin - script to fire up pppd on login mesg n stty -echo exec /usr/sbin/pppd -detach :192.168.1.100 proxyarp