Keeping pppd alive--how?

From: Phisherman (nobody_at_noone.com)
Date: 10/29/04


Date: Fri, 29 Oct 2004 18:54:00 GMT

I have yet to solve this problem and I'm no Linux expert. I use
Fedora Core One (text only!) running Squid as my proxy server. I
wrote a script to dial up my ISP, wait 40 seconds, then start up Jay's
Firewall. It goes offline periodically, so I re-run this script
manually. (All I do is type ./s on the keyboard without using the
monitor.) Sometimes a family member will startup this script if I am
not present. I always have this computer logged in as root--I know
this not a good idea, but physical security is not a big concern.
What I have not been successful is writing a script to automate this
process.

Here's my script (called s) that dials up the ISP and starts the
firewall:

#!/bin/sh
#
./ppp-on
sleep 40s
./fire

Here's a hangup script I use to disconnect (works great!):

#!/bin/sh
#
killall pppd

What I want Linux to do (automatically) is to run the "s" script if
the modem loses the connection. What is the best way to do this? A
cron job? A looping script? Perhaps using the netstat command to do
the "test?"

Another thought. I need to easily disable running the s script if I
need to take the modem offline to make a phone call.

I appreciate any detailed suggestions. Thanks!



Relevant Pages

  • Re: RFC: my firewall ruleset(s)
    ... IPFW numbers rules that increment by 1. ... > The reasoning behind this is so I have a single firewall script for all ... Depending on the rc.conf entries on that server, the firewall ...
    (freebsd-questions)
  • Re: Turing of SP2 Firewall via registry entry?
    ... Group Policy that disables the firewall (see WF_XPSP2.doc ... Disabling the Use of Windows Firewall Across Your Network ... you create a script file that is read by ...
    (microsoft.public.windowsxp.security_admin)
  • Re: MS Security CD, wsh topic buried, non automated post (promise)
    ... Their stuff is for server is seems. ... you most likely want to script your 'access'. ... the firewall still inserted stuff in about every ... > Saying that you network drives may cease working. ...
    (microsoft.public.scripting.wsh)
  • Re: what www perl script is running?
    ... When you run a firewall on a host, you open the ports for the services you want ... that doesn't really add to security at all and may well make you less vigilant. ... Security isn't always about preventing a compromise. ... The part you missed is that the installed script needs to connect out to ...
    (freebsd-questions)
  • Re: XPs Firewall
    ... How do you for example help people having just a single machine and an ... internet connection when a firewall is not available in their local ... script, or it's author? ... Yet all that guarantees is that if you download a script from my website ...
    (microsoft.public.security.virus)