From owner-freebsd-isp Sun Apr 11 15:34:17 1999 Delivered-To: freebsd-isp@freebsd.org Received: from aniwa.sky (p26-max12.wlg.ihug.co.nz [216.100.145.26]) by hub.freebsd.org (Postfix) with ESMTP id 8D79314CF9 for ; Sun, 11 Apr 1999 15:34:03 -0700 (PDT) (envelope-from andrew@squiz.co.nz) Received: from aniwa.sky (localhost [127.0.0.1]) by aniwa.sky (8.9.1a/8.9.1) with ESMTP id AAA16690; Mon, 12 Apr 1999 00:01:36 +1200 (NZST) Message-Id: <199904111201.AAA16690@aniwa.sky> X-Mailer: exmh version 2.0.2 2/24/98 To: Mark Mayo Cc: freebsd-isp@FreeBSD.ORG Subject: Re: ppp script for collecting POP stats In-reply-to: Your message of "Wed, 07 Apr 1999 23:34:17 -0400." <19990407233417.A26998@vmunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 12 Apr 1999 00:01:35 +1200 From: Andrew McNaughton Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Hey there. Anyone know of any scripts published already that > can use freebsd's 'ppp' or 'pppd' to automate dialing a bunch > of POP sites. I just need something simple - i.e. dial about > 30 phone numbers one after the other, continuously, and report > basic stats. > > Wrapping ppp doesn't look to tough, but before I dig in, I figured > someone must have written this already! :-) > > TIA, > -Mark Automating ppp connections is trivial using pppctl. You'll want a line in your /etc/ppp/ppp.conf default section like so: default: set socket /var/run/ppp_socket password 0660 whether you want group access depends on your setup. Alternatively you can use a TCP socket which means the connection can be opened from another machine, but there's a security issue, and I think it's better to provide a more limited interface to remote machines (ie less control over routes). You can write a script to automate multiple connections along these lines: #!/bin/sh for site in x y z do cat password | pppctl /var/run/ppp_socket "delete all;close;load $site;dial" do your thing done cat password | pppctl /var/run/ppp_socket "delete all;close" -- ----------- Andrew McNaughton andrew@squiz.co.nz http://www.newsroom.co.nz/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message