From owner-freebsd-questions@FreeBSD.ORG Sun Apr 10 11:44:32 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2689216A4CE for ; Sun, 10 Apr 2005 11:44:32 +0000 (GMT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id C853243D45 for ; Sun, 10 Apr 2005 11:44:31 +0000 (GMT) (envelope-from infofarmer@mail.ru) Received: from [83.237.13.12] (port=4982 helo=[172.17.0.69]) by mx2.mail.ru with asmtp id 1DKare-000DxD-00; Sun, 10 Apr 2005 15:44:30 +0400 Message-ID: <425911A0.90305@mail.ru> Date: Sun, 10 Apr 2005 15:44:32 +0400 From: "Andrew P." User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Odhiambo Washington References: <20050410104336.GB59286@ns2.wananchi.com> In-Reply-To: <20050410104336.GB59286@ns2.wananchi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Running PPP via crontab X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: infofarmer@mail.ru List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 11:44:32 -0000 Odhiambo Washington wrote: > Hello everyone, > > I have setup a FreeBSD box which a friend of mine will run as a mail > server/firewall in his SOHO, using dialup (modem) to his ISP. Almost > everything is setup and running, even ppp can work when I manually > run through the dialup procedure. > > I don't have much problem configuring what he will run on this box, but > one aspect has pinned me down. The ppp _MUST_ not run in "auto" or > "ondemand" modes. It must be initiated manually. > > I would like to make a crontab entry that will run ppp after every one > hour. I don't have a problem with crontab, but how to invoke ppp via it > ;) > > I'd appreciate some hand-holding here. What shall I put as the command > that will be run by cron? 1 */1 * * * root /usr/sbin/ppp -quiet -ddial -nat mtu Something like this where "root" is the user to run ppp as (remove it in case you're not a superuser and not editing /etc/crontab), "-ddial" is the mode - change it to whatever you need, "-nat" enables nat (you can also do it from ppp.conf), and "mtu" is the section of ppp.conf to load. Best wishes, Andrew P.