Professional Web Applications Themes

Running PPP via crontab - FreeBSD

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 ...

  1. #1

    Default Running PPP via crontab

    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?



    -Wash

    http://www.netmeister.org/news/learn2quote.html

    --
    +================================================= =====================+
    |\ _,,,---,,_ | Odhiambo Washington <com>
    Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com
    |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922
    '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121
    +================================================= =====================+
    Do you realize how many holes there could be if people would just take
    the time to take the dirt out of them?
    Odhiambo Guest

  2. #2

    Default Re: Running PPP via crontab

    Odhiambo Washington wrote: 


    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.
    Andrew Guest

  3. #3

    Default Re: Running PPP via crontab

    * Andrew P. <ru> [20050410 14:44]: wrote: 
    >
    >
    > 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.[/ref]


    Hello Andrew, et al,

    I figured out I could use "ppp -background s" (where s is
    the ISP label in ppp.conf). This seems to be what I am looking for,
    no?? I can run it on the command line. I hope it will do same thing
    via cron.


    -Wash

    http://www.netmeister.org/news/learn2quote.html

    --
    +================================================= =====================+
    |\ _,,,---,,_ | Odhiambo Washington <com>
    Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com
    |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922
    '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121
    +================================================= =====================+
    One way to make your old car run better is to look up the price of a
    new model.
    Odhiambo Guest

  4. #4

    Default Re: Running PPP via crontab

    Odhiambo Washington wrote: 


    Frankly, I don't seem to know what exactly
    you're looking for. I find ddial mode perfect
    for most uses.

    If you tell us precisely what you want,
    we may be able to suggest a better solution.


    Best wishes,
    Andrew P.
    Andrew Guest

Similar Threads

  1. Running Dml Script in Crontab
    By mark.goudie@gmail.com in forum Linux / Unix Administration
    Replies: 8
    Last Post: May 24th, 03:09 PM
  2. Crontab
    By Antigoni in forum Linux / Unix Administration
    Replies: 2
    Last Post: June 4th, 12:15 PM
  3. crontab log
    By NIr in forum Sun Solaris
    Replies: 2
    Last Post: August 27th, 11:02 PM
  4. crontab bug?
    By LeVA in forum Debian
    Replies: 1
    Last Post: August 4th, 12:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139