summaryrefslogtreecommitdiffstats
path: root/etc/ppp/ppp.conf.sample
blob: 75658f9caf30bdb50ef20477b01eec983146680e (plain)
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#################################################################
#
#  	PPP  Sample Configuration File
#
#	  Written by Toshiharu OHNO
#
# $Id: ppp.conf.sample,v 1.19 1997/09/08 20:22:39 brian Exp $
#
#################################################################

# Default setup. Always executed when PPP is invoked.
#
default:
 set device /dev/cuaa1
 set speed 115200
 set log Phase Chat Connect Carrier hdlc LCP IPCP CCP tun
 deny lqr
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"

# Example with a login script
#
#   o From PPP prompt,
#	ppp> dial simplesite
#     automatically dials and performs the login script.
#
#       ppp> load simplesite
#     loads and executes commands, but doesn't dial.
#
#   o From shell, invoke as
#       $ ppp simplesite
#     to load commands associated with the 'simplesite' label. Use,
#       ppp> dial
#     to establish the connection.
#
simplesite:
 set phone 12345678
 set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp ocol: ppp"
 set timeout 120

# 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.
#
multiphone:
 set phone 12345678|12345679:12345670|12345671
 set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp ocol: ppp"

# 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.
#
PAPorCHAPsite:
 set phone 12345678
 set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp"
 set authname MySystemName
 set authkey  OurSecretKey

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

# 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.
#  You must supply -auto, -ddial or -background option to invoke PPP.
#
#  $ ppp -auto ondemand
#
ondemand:
 set phone 1234567
 set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp"
 set timeout 120
 set ifaddr 192.244.185.226 192.244.176.44 255.255.255.0
 add 0 0 HISADDR

# Another on demand example
#  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.
#
pmdemand:
 set phone 1234567
 set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp"
 set timeout 120
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0
 delete ALL
 add 0 0 HISADDR

# Examples to connect using a null-modem cable from one machine to another.
# 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.
# 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
 set log Phase Chat LQM
 set login "TIMEOUT 5 ogin:--ogin: ppp word: ppp HELLO"
 set ifaddr 10.0.4.2 10.0.4.1
 enable lqr
 accept lqr
 
direct-server:
 set timeout 900 10 3
 set log Phase LQM
 set ifaddr 10.0.4.1 10.0.4.2
 enable lqr
 accept lqr

# Example of Callback Request
#
#  Here, we assume that peer will hangup the line and initiates a callback
#  after successful authentication. We simply use chat script capability
#  and wait for a "NO CARRIER" response from our modem.
#
#  $ ppp callback
#
callback:
 set phone 0312345678
 set login "ABORT NO\\sCARRIER TIMEOUT 5 ogin:--ogin: MyName word: MySecret TIMEOUT 20 DUMMY"
 set log phase chat
 dial
 quit

# 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
 set escape 0xff
 set ifaddr 10.0.5.1 10.0.4.1 255.255.255.0

tcp-server:
 set escape 0xff
 set ifaddr 10.0.4.1 10.0.5.1 255.255.255.0
OpenPOWER on IntegriCloud