1995-01-31 06:24:33 +00:00
|
|
|
#################################################################
|
|
|
|
#
|
|
|
|
# PPP Sample Configuration File
|
|
|
|
#
|
|
|
|
# Written by Toshiharu OHNO
|
|
|
|
#
|
1997-09-10 00:52:30 +00:00
|
|
|
# $Id: ppp.conf.sample,v 1.19 1997/09/08 20:22:39 brian Exp $
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
|
|
|
#################################################################
|
1997-02-23 14:04:23 +00:00
|
|
|
|
|
|
|
# Default setup. Always executed when PPP is invoked.
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
|
|
|
default:
|
1996-03-08 09:39:45 +00:00
|
|
|
set device /dev/cuaa1
|
1997-08-25 01:07:08 +00:00
|
|
|
set speed 115200
|
|
|
|
set log Phase Chat Connect Carrier hdlc LCP IPCP CCP tun
|
1995-01-31 06:24:33 +00:00
|
|
|
deny lqr
|
1995-04-22 17:14:21 +00:00
|
|
|
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1997-08-25 01:07:08 +00:00
|
|
|
# Example with a login script
|
|
|
|
#
|
1995-01-31 06:24:33 +00:00
|
|
|
# o From PPP prompt,
|
|
|
|
# ppp> dial simplesite
|
1997-02-23 14:04:23 +00:00
|
|
|
# automatically dials and performs the login script.
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
|
|
|
# ppp> load simplesite
|
1997-02-23 14:04:23 +00:00
|
|
|
# loads and executes commands, but doesn't dial.
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
|
|
|
# o From shell, invoke as
|
1997-08-25 01:07:08 +00:00
|
|
|
# $ ppp simplesite
|
1997-02-23 14:04:23 +00:00
|
|
|
# to load commands associated with the 'simplesite' label. Use,
|
1995-01-31 06:24:33 +00:00
|
|
|
# ppp> dial
|
|
|
|
# to establish the connection.
|
|
|
|
#
|
|
|
|
simplesite:
|
|
|
|
set phone 12345678
|
1997-08-25 01:07:08 +00:00
|
|
|
set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp ocol: ppp"
|
1995-01-31 06:24:33 +00:00
|
|
|
set timeout 120
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1997-08-25 01:07:08 +00:00
|
|
|
# Multi-phone example. Numbers separated by a : are used sequentially.
|
|
|
|
# Numbers separated by a | are used if the previous dial or login script
|
|
|
|
# failed. Usually, you will prefer to use only one of | or :, but both
|
|
|
|
# are allowed.
|
1996-03-08 09:39:45 +00:00
|
|
|
#
|
|
|
|
multiphone:
|
1997-08-25 01:07:08 +00:00
|
|
|
set phone 12345678|12345679:12345670|12345671
|
|
|
|
set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp ocol: ppp"
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1997-09-10 00:52:30 +00:00
|
|
|
# If the peer requires that you use CHAP or PAP, you must supply authname
|
|
|
|
# and authkey. Both are "accepted" by default, so you don't have to do
|
|
|
|
# any more.
|
1996-03-08 09:39:45 +00:00
|
|
|
#
|
1997-09-10 00:52:30 +00:00
|
|
|
PAPorCHAPsite:
|
1995-01-31 06:24:33 +00:00
|
|
|
set phone 12345678
|
1997-08-25 01:07:08 +00:00
|
|
|
set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp"
|
1995-01-31 06:24:33 +00:00
|
|
|
set authname MySystemName
|
|
|
|
set authkey OurSecretKey
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1997-09-10 00:52:30 +00:00
|
|
|
# If you want the remote system to authenticate itself, you insist
|
|
|
|
# that the peer uses CHAP (or PAP) with the "enable" keyword. Both CHAP and
|
|
|
|
# PAP are disabled by default.
|
|
|
|
# When the peer authenticates itself, we use ppp.secret for verification.
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
1997-09-10 00:52:30 +00:00
|
|
|
# Ppp is launched with
|
|
|
|
#
|
|
|
|
# ppp -direct CHAPserver
|
|
|
|
#
|
|
|
|
# Note: We can supply a third field in ppp.secret specifying the IP address
|
|
|
|
# for that user.
|
|
|
|
#
|
|
|
|
CHAPserver:
|
|
|
|
enable chap
|
|
|
|
enable proxy
|
|
|
|
set ifaddr 192.244.176.44 292.244.184.31
|
|
|
|
|
|
|
|
# If we wish to use /etc/passwd, we do this:
|
|
|
|
PAPServerwithPASSWD:
|
|
|
|
enable pap
|
|
|
|
enable passwdauth
|
|
|
|
enable proxy
|
|
|
|
set ifaddr 192.244.176.44 292.244.184.31
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1995-01-31 06:24:33 +00:00
|
|
|
# On demand dialup example
|
|
|
|
# Here, we assume that local side use 192.244.185.226 and
|
|
|
|
# remote side use 192.244.176.44 as their IP address.
|
1997-09-10 00:52:30 +00:00
|
|
|
# You must supply -auto, -ddial or -background option to invoke PPP.
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
1997-02-23 14:04:23 +00:00
|
|
|
# $ ppp -auto ondemand
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
|
|
|
ondemand:
|
|
|
|
set phone 1234567
|
1997-08-25 01:07:08 +00:00
|
|
|
set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp"
|
1995-01-31 06:24:33 +00:00
|
|
|
set timeout 120
|
1996-03-08 09:39:45 +00:00
|
|
|
set ifaddr 192.244.185.226 192.244.176.44 255.255.255.0
|
1997-09-08 20:22:39 +00:00
|
|
|
add 0 0 HISADDR
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1995-01-31 06:24:33 +00:00
|
|
|
# Another on demand example
|
1997-02-23 14:04:23 +00:00
|
|
|
# If the peer assigns us an arbitrary IP and we can't predict what their
|
|
|
|
# IP will be either, take a wild guess at an some IPs that you can't
|
|
|
|
# currently route to. Ensure that the "delete" and "add" lines are also
|
|
|
|
# present in ppp.linkup so that when we connect, things will be put straight.
|
|
|
|
#
|
|
|
|
# The /0 bit says that we insist on 0 bits of the specified IP actually
|
|
|
|
# being correct, therefore, the other side can assign any IP numbers.
|
|
|
|
#
|
1997-03-16 00:59:08 +00:00
|
|
|
pmdemand:
|
1995-01-31 06:24:33 +00:00
|
|
|
set phone 1234567
|
1997-08-25 01:07:08 +00:00
|
|
|
set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp"
|
1995-01-31 06:24:33 +00:00
|
|
|
set timeout 120
|
1997-05-12 14:07:14 +00:00
|
|
|
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0
|
1997-02-23 14:04:23 +00:00
|
|
|
delete ALL
|
1997-08-25 01:07:08 +00:00
|
|
|
add 0 0 HISADDR
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1997-03-13 21:24:18 +00:00
|
|
|
# Examples to connect using a null-modem cable from one machine to another.
|
1997-05-08 00:55:42 +00:00
|
|
|
# The important thing here is to allow the lqr packets on both sides.
|
|
|
|
# Without them enabled, we can't tell if the line's dropped - there
|
|
|
|
# should always be carrier on a direct connection.
|
1997-03-13 21:24:18 +00:00
|
|
|
# Here, the server sends lqr's every 10 seconds and quits if three in a
|
|
|
|
# row fail.
|
|
|
|
#
|
|
|
|
# Make sure you don't have "deny lqr" in your default: on the client !
|
|
|
|
#
|
|
|
|
direct-client:
|
|
|
|
set dial ""
|
|
|
|
set line /dev/cuaa0
|
|
|
|
set sp 115200
|
|
|
|
set timeout 900
|
1997-06-10 10:04:20 +00:00
|
|
|
set log Phase Chat LQM
|
1997-08-25 01:07:08 +00:00
|
|
|
set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp HELLO"
|
1997-03-13 21:24:18 +00:00
|
|
|
set ifaddr 10.0.4.2 10.0.4.1
|
1997-09-07 01:04:02 +00:00
|
|
|
enable lqr
|
|
|
|
accept lqr
|
1997-03-13 21:24:18 +00:00
|
|
|
|
|
|
|
direct-server:
|
|
|
|
set timeout 900 10 3
|
1997-06-10 10:04:20 +00:00
|
|
|
set log Phase LQM
|
1997-03-13 21:24:18 +00:00
|
|
|
set ifaddr 10.0.4.1 10.0.4.2
|
1997-09-07 01:04:02 +00:00
|
|
|
enable lqr
|
|
|
|
accept lqr
|
1997-03-13 21:24:18 +00:00
|
|
|
|
1995-01-31 06:24:33 +00:00
|
|
|
# Example of Callback Request
|
|
|
|
#
|
|
|
|
# Here, we assume that peer will hangup the line and initiates a callback
|
1996-01-31 15:03:18 +00:00
|
|
|
# after successful authentication. We simply use chat script capability
|
|
|
|
# and wait for a "NO CARRIER" response from our modem.
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
1997-02-23 14:04:23 +00:00
|
|
|
# $ ppp callback
|
1995-01-31 06:24:33 +00:00
|
|
|
#
|
|
|
|
callback:
|
|
|
|
set phone 0312345678
|
1997-08-25 01:07:08 +00:00
|
|
|
set login "ABORT NO\\sCARRIER TIMEOUT 5 ogin:--ogin: MyName word: MySecret TIMEOUT 20 DUMMY"
|
1997-06-10 10:04:20 +00:00
|
|
|
set log phase chat
|
1995-01-31 06:24:33 +00:00
|
|
|
dial
|
|
|
|
quit
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1997-08-25 01:07:08 +00:00
|
|
|
# Example for ppp over tcp. We assume that inetd on tcpsrv.mynet has been
|
|
|
|
# configured to run "ppp -direct tcp-server" when it gets a connection on
|
|
|
|
# port 1234. Read doc for further details
|
|
|
|
#
|
|
|
|
tcp-client:
|
|
|
|
set device tcpsrv.mynet:1234
|
|
|
|
set dial
|
|
|
|
set login
|
1995-01-31 06:24:33 +00:00
|
|
|
set escape 0xff
|
1997-09-01 22:21:18 +00:00
|
|
|
set ifaddr 10.0.5.1 10.0.4.1 255.255.255.0
|
1997-02-23 14:04:23 +00:00
|
|
|
|
1997-08-25 01:07:08 +00:00
|
|
|
tcp-server:
|
|
|
|
set escape 0xff
|
1997-09-01 22:21:18 +00:00
|
|
|
set ifaddr 10.0.4.1 10.0.5.1 255.255.255.0
|