Results 1 to 4 of 4

Thread: mini Dial on Demand Howto

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    25

    mini Dial on Demand Howto

    This mini HowTo describes how the typical "home" linux user can "dial out on demand",
    with out having to build a connection first then starting up their favorite internet utility (i.e. netscape).

    First you will need to set-up ppp, the easiest way to do this
    is through "linuxconf". Go to the networking section and enter
    in your username, password and number that you use to dial
    out to your ISP.

    Next you will need to to make/edit "/etc/resolv.conf" :
    nameserver 255.255.255.255
    nameserver 255.255.255.255
    Naturaly you need to replace "255.255.255.255" with your ISPs primary and secondary DNS.

    now you will need to copy the newly created resolv.conf to /etc/ppp:
    ~>#cp /etc/resolv.conf /etc/ppp/resolv.conf

    Now lets test the connection:
    ~>$ifup ppp0

    Your modem should be dialing out now, if it's not check the files
    in /etc/ppp for anything out of the ordinary.

    To bring down the connection:
    ~>$ifdown ppp0

    Lets setup the DoD now.
    Fire up your favorite text editor and make a file called chat-hacks.
    The contents of the file shoud look like this:

    ABORT "NO CARRIER"
    ABORT "NO DIALTONE"
    ABORT "BUSY
    ABORT "ERROR"
    ABORT "NO ANSWER"
    ABORT "Username/Password Incorrect"
    ABORT "Authentication Failure"
    ABORT "Bad Password"
    REPORT CARRIER
    REPORT CONNECT
    "" "at"
    OK "ATZ"
    OK "ATM1L2"
    OK "ATDT5555555"
    "ogin:" "yourusername"
    "word:" "yourpassword"

    Replace 5555555 with your ISPs phone number.
    Save this file as /etc/ppp/chat-hacks

    Now open up /etc/ppp/options and enter this in:

    lock
    defaultroute
    noauth
    demand
    bsdcomp 15
    receive-all
    192.168.255.250:192.168.255.251
    ipcp-accept-remote
    ipcp-accept-local
    holdoff 12

    (If you don't have "Unlimted Internet Access" you can add "idle 300" to the end of options. This will disconnect you after 5 minutes of inactivity.)

    Also, if you are dialing into a windows machine, you will need to add this to the end of options:

    name "workgroup\\username"
    remote-name "servername"

    Take a look in /etc/ppp for a directory called peers
    if it isn't there:
    mkdir /etc/ppp/peers && cd /etc/ppp/peers

    Now create a file with the following content:

    ttySn 115200 crtscts
    connect '/usr/sbin/chat -v -f /etc/ppp/chat-hacks'
    noauth

    Replace ttySn with whatever tty your modem is connected to.
    Save this file as /etc/ppp/peers/isp

    Lets test this out now:
    ~>$pppd call isp

    ~>$ping -c 1 antionline.com

    your modem should have dialed out and pinged antionline

    To bring down the connection:
    ~>$killall pppd

    If it didn't dial out:
    ~>#tail /var/log/messages

    This will display what went wrong so you can hopefully fix it.

    So now whenever you use any program or utility that requiers an internet connection, your modem will/should dial out.
    To start this everytime you boot edit /etc/rc.d/rc.local
    and put this at the bottom:

    pppd call isp

    -----
    |Taboo|
    -----
    --
    \"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.\"
    Dennis Ritchie.

  2. #2
    Junior Member
    Join Date
    Jan 2002
    Posts
    21
    thanks for the help

  3. #3
    hey man. I setup everything as you said in the tutorial. Got it to dial out using ifup (which was already setup) and using pppd call isp. If I did the killall pppd, it wouldnt work again (i guess I need to restart the pppd). I tried to let it call out automatically, but it never even tried to connect after I brought up netscape and tried to bring up a page on the net. Is there anything Im missing as far as setup? I would really like it to work over a network, so that if any of my puters tried to access a webpage, it would dial out. Thanks for the info so far dude.
    Bolt actions speak louder than words.

  4. #4
    Junior Member
    Join Date
    Jan 2002
    Posts
    25
    If you did a killall pppd
    You need to "pppd call isp" again, this restarts the pppd

    Taboo--
    --
    \"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.\"
    Dennis Ritchie.

Posting Permissions

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