Dial multiple numbers for different IP's - PPP

This is a discussion on Dial multiple numbers for different IP's - PPP ; I currently have a PPP server setup in my office so that I can connect to remote PCs and so that they can call back in and get Internet access. Is there a way to setup dial on demand or ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Dial multiple numbers for different IP's

  1. Dial multiple numbers for different IP's

    I currently have a PPP server setup in my office so that I can connect
    to remote PCs and so that they can call back in and get Internet
    access. Is there a way to setup dial on demand or diald so that each
    of my remote PC's has a unique static IP on my subnet and when traffic
    for that IP is available the Server will dial that PCs phone number.
    This currently works as a demand dial server to connect to a single PC
    but I would like to add more and not have to rewrite the connection
    script for each new phone number.

  2. Re: Dial multiple numbers for different IP's

    dirtytoyota@hotmail.com (PullnOutHair) writes:
    > I currently have a PPP server setup in my office so that I can connect
    > to remote PCs and so that they can call back in and get Internet
    > access. Is there a way to setup dial on demand or diald so that each
    > of my remote PC's has a unique static IP on my subnet and when traffic
    > for that IP is available the Server will dial that PCs phone number.
    > This currently works as a demand dial server to connect to a single PC
    > but I would like to add more and not have to rewrite the connection
    > script for each new phone number.


    Sure; you just need to parameterize it appropriately. Here's a (mostly
    untested but ought to work) suggestion:

    Create a file called /etc/ppp/peers/generic-dial with this inside:

    ttyS0
    115200
    lock
    demand
    idle 20
    nodefaultroute
    proxyarp
    connect /etc/ppp/my-connector


    Then create a script called /etc/ppp/my-connector:

    #!/bin/sh
    exec /usr/bin/chat "" "AT&F1" OK "ATDT$PHONE" CONNECT "\c"

    Mark it executable by doing:

    # chmod +x /etc/ppp/my-connector

    Then create a script that launches the pppds you want:

    #!/bin/sh

    while read PHONE ADDRESSES
    do
    export PHONE
    /usr/bin/pppd call generic-dial $ADDRESSES
    done << EOF
    555-1212 10.0.0.1:10.0.0.2
    1-800-111-2222 10.0.0.1:10.0.0.3
    1-44-55-55-55 10.0.0.1:10.0.0.4
    EOF

    And invoke that script from rc.local or equivalent. You could
    simplify it a little if the local address is always the same (likely
    to be true for this application).

    --
    James Carlson, IP Systems Group
    Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

+ Reply to Thread