[EMAIL PROTECTED] wrote: > > howdy folks. > > Im having problems with this bloody alcatel every day. I mean, I > dont really know whether its provider, or drivers inconvenience. > Im using mandrake81 and benoit drivers(took me BLOODY ages to run > it;)). Everythings perfect. Connection is on, everything's fine. > Suddenly (usually after a day or less) it all stucks. Trying to > ping outside - nothing.. so gotta restart it everytime. Connection > seems to be on (in ifconfig ppp0 exists though), but its > not ;) .The only trouble is that Ive gotta restart it manually, coz > Im too thick to write a script.Need a script to check the > connection and if it fails to reconnect. I bet some of you got > it...could you drop me a line? how to do it? >
See script as below. A few points.... A) BT moved their server, and the new one may be dynamically allocated. May be able to fix this with a netmask. B) To make the script work, you need to have said 'M' to some modules in the kernel. C) If you are going to call this via a cron script, you need to have the full pathnames for commands in the script. D) I have included a call to iptables and snort in the script. This is a separate issue to getting the link working. E) For kernels 2.2.XX and those using ipchains - modify the script Maybe somebody could revisit the LCP settings in the pppd/adsl options script because optimum settings for a reconnect script may have changed from those previously advised. My script is pasted below. Change the XXX to suit your ISP. HTH Richard A Lough **************************************************** #!/bin/sh # Ok here's my setup - you'll need to change !!PPP-Partner!! to the ip # address of the other side of your ppp link (ie the ip address listed by # "P-t-P:" in ifconfig ppp0). I have this script being run by cron every # five minutes. It assumes that /proc/bus/usb is in /etc/fstab (and that # no other processes have fd's open in that dir!). The limits themselves # are probably a bit generous but do the job of stopping it hitting # system limits. # note that mgmt.o is in /usr/local/lib/ # -- # Chris Wilson <[EMAIL PROTECTED]> # ver 1.1 - added lines for snort, iptables, and ip_nat_ftp - R A Lough # ifconfig | grep ppp0 >/dev/null 2>&1 && ping -c 2 !!PPP-Partner!! 2>&1 > /dev/null /sbin/ifconfig | /bin/grep ppp0 >/dev/null 2>&1 && /bin/ping -c 2 XXX.XXX.XXX.XXX 2>&1 > /dev/null if test $? -eq 1 then killall pppd sleep 1 killall -9 pppd pppoa3 killall modem_run sleep 1 killall -9 modem_run pppd pppoa3 /bin/umount /proc/bus/usb /etc/init.d/snort stop /sbin/iptables -F /sbin/rmmod usb-uhci /sbin/rmmod ip_nat_ftp # /sbin/rmmod usbcore sleep 3 /sbin/modprobe usb-uhci sleep 3 /sbin/mount /proc/bus/usb /usr/local/bin/modem_run -v 1 -f /usr/local/lib/mgmt.o -m sleep 60 ulimit -n 200 ulimit -u 500 /usr/sbin/pppd call adsl sleep 6 /etc/iptables.rules sleep 6 # /sbin/insmod /lib/modules/2.4.6/kernel/net/ipv4/netfilter/ip_nat_ftp.o sleep 3 /etc/init.d/snort start sleep 3 fi Liste de diffusion modem ALCATEL SpeedTouch USB Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe
