]>
Commit | Line | Data |
---|---|---|
a373e543 SS |
1 | From d7faeb88f684c8b2ae193b2c5b5b358ac757fcfa Mon Sep 17 00:00:00 2001 |
2 | From: Michal Sekletar <msekleta@redhat.com> | |
3 | Date: Fri, 4 Apr 2014 11:39:09 +0200 | |
4 | Subject: [PATCH 04/25] doc: add configuration samples | |
5 | ||
6 | --- | |
7 | sample/auth-down | 17 ++++++ | |
8 | sample/auth-up | 17 ++++++ | |
9 | sample/ip-down | 22 ++++++++ | |
10 | sample/ip-up | 23 ++++++++ | |
11 | sample/options | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++ | |
12 | sample/options.ttyXX | 14 +++++ | |
13 | sample/pap-secrets | 28 ++++++++++ | |
14 | 7 files changed, 274 insertions(+) | |
15 | create mode 100644 sample/auth-down | |
16 | create mode 100644 sample/auth-up | |
17 | create mode 100644 sample/ip-down | |
18 | create mode 100644 sample/ip-up | |
19 | create mode 100644 sample/options | |
20 | create mode 100644 sample/options.ttyXX | |
21 | create mode 100644 sample/pap-secrets | |
22 | ||
23 | diff --git a/sample/auth-down b/sample/auth-down | |
24 | new file mode 100644 | |
25 | index 0000000..edde65d | |
26 | --- /dev/null | |
27 | +++ b/sample/auth-down | |
0bc5d371 MT |
28 | @@ -0,0 +1,17 @@ |
29 | +#!/bin/sh | |
30 | +# | |
31 | +# A program or script which is executed after the remote system | |
32 | +# successfully authenticates itself. It is executed with the parameters | |
33 | +# <interface-name> <peer-name> <user-name> <tty-device> <speed> | |
34 | +# | |
35 | + | |
36 | +# | |
37 | +# The environment is cleared before executing this script | |
38 | +# so the path must be reset | |
39 | +# | |
40 | +PATH=/usr/sbin:/sbin:/usr/bin:/bin | |
41 | +export PATH | |
42 | + | |
43 | +echo auth-down `date +'%y/%m/%d %T'` $* >> /var/log/pppstats | |
44 | + | |
45 | +# last line | |
a373e543 SS |
46 | diff --git a/sample/auth-up b/sample/auth-up |
47 | new file mode 100644 | |
48 | index 0000000..54722a3 | |
49 | --- /dev/null | |
50 | +++ b/sample/auth-up | |
0bc5d371 MT |
51 | @@ -0,0 +1,17 @@ |
52 | +#!/bin/sh | |
53 | +# | |
54 | +# A program or script which is executed after the remote system | |
55 | +# successfully authenticates itself. It is executed with the parameters | |
56 | +# <interface-name> <peer-name> <user-name> <tty-device> <speed> | |
57 | +# | |
58 | + | |
59 | +# | |
60 | +# The environment is cleared before executing this script | |
61 | +# so the path must be reset | |
62 | +# | |
63 | +PATH=/usr/sbin:/sbin:/usr/bin:/bin | |
64 | +export PATH | |
65 | + | |
66 | +echo auth-up `date +'%y/%m/%d %T'` $* >> /var/log/pppstats | |
67 | + | |
68 | +# last line | |
a373e543 SS |
69 | diff --git a/sample/ip-down b/sample/ip-down |
70 | new file mode 100644 | |
71 | index 0000000..b771fb6 | |
72 | --- /dev/null | |
73 | +++ b/sample/ip-down | |
0bc5d371 MT |
74 | @@ -0,0 +1,22 @@ |
75 | +#!/bin/sh | |
76 | +# | |
77 | +# This script is run by the pppd _after_ the link is brought down. | |
78 | +# It should be used to delete routes, unset IP addresses etc. | |
79 | +# | |
80 | +# This script is called with the following arguments: | |
81 | +# Arg Name Example | |
82 | +# $1 Interface name ppp0 | |
83 | +# $2 The tty ttyS1 | |
84 | +# $3 The link speed 38400 | |
85 | +# $4 Local IP number 12.34.56.78 | |
86 | +# $5 Peer IP number 12.34.56.99 | |
87 | +# | |
88 | + | |
89 | +# | |
90 | +# The environment is cleared before executing this script | |
91 | +# so the path must be reset | |
92 | +# | |
93 | +PATH=/usr/sbin:/sbin:/usr/bin:/bin | |
94 | +export PATH | |
95 | + | |
96 | +# last line | |
a373e543 SS |
97 | diff --git a/sample/ip-up b/sample/ip-up |
98 | new file mode 100644 | |
99 | index 0000000..7ce7c8d | |
100 | --- /dev/null | |
101 | +++ b/sample/ip-up | |
0bc5d371 MT |
102 | @@ -0,0 +1,23 @@ |
103 | +#!/bin/sh | |
104 | +# | |
105 | +# This script is run by the pppd after the link is established. | |
a373e543 | 106 | +# It should be used to add routes, set IP address, run the mailq |
0bc5d371 MT |
107 | +# etc. |
108 | +# | |
109 | +# This script is called with the following arguments: | |
110 | +# Arg Name Example | |
111 | +# $1 Interface name ppp0 | |
112 | +# $2 The tty ttyS1 | |
113 | +# $3 The link speed 38400 | |
114 | +# $4 Local IP number 12.34.56.78 | |
115 | +# $5 Peer IP number 12.34.56.99 | |
116 | +# | |
117 | + | |
118 | +# | |
119 | +# The environment is cleared before executing this script | |
120 | +# so the path must be reset | |
121 | +# | |
122 | +PATH=/usr/sbin:/sbin:/usr/bin:/bin | |
123 | +export PATH | |
124 | + | |
125 | +# last line | |
a373e543 SS |
126 | diff --git a/sample/options b/sample/options |
127 | new file mode 100644 | |
128 | index 0000000..8d0a3f9 | |
129 | --- /dev/null | |
130 | +++ b/sample/options | |
0bc5d371 MT |
131 | @@ -0,0 +1,153 @@ |
132 | +# /etc/ppp/options | |
133 | + | |
134 | +# The name of this server. Often, the FQDN is used here. | |
135 | +#name <host> | |
136 | + | |
137 | +# Enforce the use of the hostname as the name of the local system for | |
138 | +# authentication purposes (overrides the name option). | |
139 | +usehostname | |
140 | + | |
141 | +# If no local IP address is given, pppd will use the first IP address | |
142 | +# that belongs to the local hostname. If "noipdefault" is given, this | |
143 | +# is disabled and the peer will have to supply an IP address. | |
144 | +noipdefault | |
145 | + | |
146 | +# With this option, pppd will accept the peer's idea of our local IP | |
147 | +# address, even if the local IP address was specified in an option. | |
148 | +#ipcp-accept-local | |
149 | + | |
150 | +# With this option, pppd will accept the peer's idea of its (remote) IP | |
151 | +# address, even if the remote IP address was specified in an option. | |
152 | +#ipcp-accept-remote | |
153 | + | |
154 | +# Specify which DNS Servers the incoming Win95 or WinNT Connection should use | |
155 | +# Two Servers can be remotely configured | |
156 | +#ms-dns 192.168.1.1 | |
157 | +#ms-dns 192.168.1.2 | |
158 | + | |
159 | +# Specify which WINS Servers the incoming connection Win95 or WinNT should use | |
160 | +#wins-addr 192.168.1.50 | |
161 | +#wins-addr 192.168.1.51 | |
162 | + | |
163 | +# enable this on a server that already has a permanent default route | |
164 | +#nodefaultroute | |
165 | + | |
166 | +# Run the executable or shell command specified after pppd has terminated | |
167 | +# the link. This script could, for example, issue commands to the modem | |
168 | +# to cause it to hang up if hardware modem control signals were not | |
169 | +# available. | |
170 | +# If mgetty is running, it will reset the modem anyway. So there is no need | |
171 | +# to do it here. | |
172 | +#disconnect "chat -- \d+++\d\c OK ath0 OK" | |
173 | + | |
174 | +# Increase debugging level (same as -d). The debug output is written | |
175 | +# to syslog LOG_LOCAL2. | |
176 | +debug | |
177 | + | |
178 | +# Enable debugging code in the kernel-level PPP driver. The argument n | |
179 | +# is a number which is the sum of the following values: 1 to enable | |
180 | +# general debug messages, 2 to request that the contents of received | |
181 | +# packets be printed, and 4 to request that the contents of transmitted | |
182 | +# packets be printed. | |
183 | +#kdebug n | |
184 | + | |
185 | +# Require the peer to authenticate itself before allowing network | |
186 | +# packets to be sent or received. | |
187 | +# Please do not disable this setting. It is expected to be standard in | |
188 | +# future releases of pppd. Use the call option (see manpage) to disable | |
189 | +# authentication for specific peers. | |
190 | +#auth | |
191 | + | |
192 | +# authentication can either be pap or chap. As most people only want to | |
193 | +# use pap, you can also disable chap: | |
194 | +#require-pap | |
195 | +#refuse-chap | |
196 | + | |
197 | +# Use hardware flow control (i.e. RTS/CTS) to control the flow of data | |
198 | +# on the serial port. | |
199 | +crtscts | |
200 | + | |
201 | +# Specifies that pppd should use a UUCP-style lock on the serial device | |
202 | +# to ensure exclusive access to the device. | |
203 | +lock | |
204 | + | |
205 | +# Use the modem control lines. | |
206 | +modem | |
207 | + | |
208 | +# async character map -- 32-bit hex; each bit is a character | |
209 | +# that needs to be escaped for pppd to receive it. 0x00000001 | |
210 | +# represents '\x01', and 0x80000000 represents '\x1f'. | |
211 | +# To allow pppd to work over a rlogin/telnet connection, ou should escape | |
212 | +# XON (^Q), XOFF (^S) and ^]: (The peer should use "escape ff".) | |
213 | +#asyncmap 200a0000 | |
214 | +asyncmap 0 | |
215 | + | |
216 | +# Specifies that certain characters should be escaped on transmission | |
217 | +# (regardless of whether the peer requests them to be escaped with its | |
218 | +# async control character map). The characters to be escaped are | |
219 | +# specified as a list of hex numbers separated by commas. Note that | |
220 | +# almost any character can be specified for the escape option, unlike | |
221 | +# the asyncmap option which only allows control characters to be | |
222 | +# specified. The characters which may not be escaped are those with hex | |
223 | +# values 0x20 - 0x3f or 0x5e. | |
224 | +#escape 11,13,ff | |
225 | + | |
226 | +# Set the MRU [Maximum Receive Unit] value to <n> for negotiation. pppd | |
227 | +# will ask the peer to send packets of no more than <n> bytes. The | |
228 | +# minimum MRU value is 128. The default MRU value is 1500. A value of | |
229 | +# 296 is recommended for slow links (40 bytes for TCP/IP header + 256 | |
230 | +# bytes of data). | |
231 | +#mru 542 | |
232 | + | |
233 | +# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer | |
234 | +# requests a smaller value via MRU negotiation, pppd will request that | |
235 | +# the kernel networking code send data packets of no more than n bytes | |
236 | +# through the PPP network interface. | |
237 | +#mtu <n> | |
238 | + | |
239 | +# Set the interface netmask to <n>, a 32 bit netmask in "decimal dot" | |
240 | +# notation (e.g. 255.255.255.0). | |
241 | +#netmask 255.255.255.0 | |
242 | + | |
243 | +# Don't fork to become a background process (otherwise pppd will do so | |
244 | +# if a serial device is specified). | |
245 | +nodetach | |
246 | + | |
247 | +# Set the assumed name of the remote system for authentication purposes | |
248 | +# to <n>. | |
249 | +#remotename <n> | |
250 | + | |
251 | +# Add an entry to this system's ARP [Address Resolution Protocol] | |
252 | +# table with the IP address of the peer and the Ethernet address of this | |
253 | +# system. {proxyarp,noproxyarp} | |
254 | +proxyarp | |
255 | + | |
256 | +# Use the system password database for authenticating the peer using | |
257 | +# PAP. Note: mgetty already provides this option. If this is specified | |
258 | +# then dialin from users using a script under Linux to fire up ppp wont work. | |
259 | +#login | |
260 | + | |
261 | +# If this option is given, pppd will send an LCP echo-request frame to | |
262 | +# the peer every n seconds. Under Linux, the echo-request is sent when | |
263 | +# no packets have been received from the peer for n seconds. Normally | |
264 | +# the peer should respond to the echo-request by sending an echo-reply. | |
265 | +# This option can be used with the lcp-echo-failure option to detect | |
266 | +# that the peer is no longer connected. | |
267 | +lcp-echo-interval 30 | |
268 | + | |
269 | +# If this option is given, pppd will presume the peer to be dead if n | |
270 | +# LCP echo-requests are sent without receiving a valid LCP echo-reply. | |
271 | +# If this happens, pppd will terminate the connection. Use of this | |
272 | +# option requires a non-zero value for the lcp-echo-interval parameter. | |
273 | +# This option can be used to enable pppd to terminate after the physical | |
274 | +# connection has been broken (e.g., the modem has hung up) in | |
275 | +# situations where no hardware modem control lines are available. | |
276 | +lcp-echo-failure 4 | |
277 | + | |
278 | +# Specifies that pppd should disconnect if the link is idle for n seconds. | |
279 | +idle 600 | |
280 | + | |
281 | +# Disable the IPXCP and IPX protocols. | |
282 | +noipx | |
283 | + | |
284 | +# ---<End of File>--- | |
a373e543 SS |
285 | diff --git a/sample/options.ttyXX b/sample/options.ttyXX |
286 | new file mode 100644 | |
287 | index 0000000..d4202f5 | |
288 | --- /dev/null | |
289 | +++ b/sample/options.ttyXX | |
0bc5d371 MT |
290 | @@ -0,0 +1,14 @@ |
291 | +# If you need to set up multiple serial lines then copy this file to | |
292 | +# options.<ttyname> for each tty with a modem on it. | |
293 | +# | |
294 | +# The options.tty file will assign an IP address to each PPP connection | |
295 | +# as it comes up. They must all be distinct! | |
296 | +# | |
297 | +# Example: | |
298 | +# options.ttyS1 for com2 under DOS. | |
299 | +# | |
300 | +# Edit the following line so that the first IP address | |
301 | +# mentioned is the ip address of the serial port while the second | |
302 | +# is the IP address of your host | |
303 | +# | |
304 | +hostname-s1:hostname | |
a373e543 SS |
305 | diff --git a/sample/pap-secrets b/sample/pap-secrets |
306 | new file mode 100644 | |
307 | index 0000000..098971b | |
308 | --- /dev/null | |
309 | +++ b/sample/pap-secrets | |
0bc5d371 MT |
310 | @@ -0,0 +1,28 @@ |
311 | +# Secrets for authentication using PAP | |
312 | +# client server secret IP addresses | |
313 | + | |
314 | +# OUTBOUND CONNECTIONS | |
315 | +# Here you should add your userid password to connect to your providers via | |
316 | +# pap. The * means that the password is to be used for ANY host you connect | |
317 | +# to. Thus you do not have to worry about the foreign machine name. Just | |
318 | +# replace password with your password. | |
319 | +# If you have different providers with different passwords then you better | |
320 | +# remove the following line. | |
321 | +#hostname * password | |
322 | + | |
323 | +# INBOUND CONNECTIONS | |
324 | +#client hostname <password> 192.168.1.1 | |
325 | + | |
326 | +# If you add "auth login -chap +pap" to /etc/mgetty+sendfax/login.config, | |
327 | +# all users in /etc/passwd can use their password for pap-authentication. | |
328 | +# | |
329 | +# Every regular user can use PPP and has to use passwords from /etc/passwd | |
330 | +#* hostname "" | |
331 | +# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any | |
332 | +# other accounts that should not be able to use pppd! Replace hostname | |
333 | +# with your local hostname. | |
334 | +#guest hostname "*" - | |
335 | +#master hostname "*" - | |
336 | +#root hostname "*" - | |
337 | +#support hostname "*" - | |
338 | +#stats hostname "*" - | |
a373e543 SS |
339 | -- |
340 | 1.8.3.1 | |
341 |