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
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
23 diff --git a/sample/auth-down b/sample/auth-down
25 index 0000000..edde65d
27 +++ b/sample/auth-down
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>
37 +# The environment is cleared before executing this script
38 +# so the path must be reset
40 +PATH=/usr/sbin:/sbin:/usr/bin:/bin
43 +echo auth-down `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
46 diff --git a/sample/auth-up b/sample/auth-up
48 index 0000000..54722a3
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>
60 +# The environment is cleared before executing this script
61 +# so the path must be reset
63 +PATH=/usr/sbin:/sbin:/usr/bin:/bin
66 +echo auth-up `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
69 diff --git a/sample/ip-down b/sample/ip-down
71 index 0000000..b771fb6
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.
80 +# This script is called with the following arguments:
82 +# $1 Interface name ppp0
84 +# $3 The link speed 38400
85 +# $4 Local IP number 12.34.56.78
86 +# $5 Peer IP number 12.34.56.99
90 +# The environment is cleared before executing this script
91 +# so the path must be reset
93 +PATH=/usr/sbin:/sbin:/usr/bin:/bin
97 diff --git a/sample/ip-up b/sample/ip-up
99 index 0000000..7ce7c8d
105 +# This script is run by the pppd after the link is established.
106 +# It should be used to add routes, set IP address, run the mailq
109 +# This script is called with the following arguments:
111 +# $1 Interface name ppp0
113 +# $3 The link speed 38400
114 +# $4 Local IP number 12.34.56.78
115 +# $5 Peer IP number 12.34.56.99
119 +# The environment is cleared before executing this script
120 +# so the path must be reset
122 +PATH=/usr/sbin:/sbin:/usr/bin:/bin
126 diff --git a/sample/options b/sample/options
128 index 0000000..8d0a3f9
134 +# The name of this server. Often, the FQDN is used here.
137 +# Enforce the use of the hostname as the name of the local system for
138 +# authentication purposes (overrides the name option).
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.
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.
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.
154 +# Specify which DNS Servers the incoming Win95 or WinNT Connection should use
155 +# Two Servers can be remotely configured
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
163 +# enable this on a server that already has a permanent default route
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
170 +# If mgetty is running, it will reset the modem anyway. So there is no need
172 +#disconnect "chat -- \d+++\d\c OK ath0 OK"
174 +# Increase debugging level (same as -d). The debug output is written
175 +# to syslog LOG_LOCAL2.
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.
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.
192 +# authentication can either be pap or chap. As most people only want to
193 +# use pap, you can also disable chap:
197 +# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
198 +# on the serial port.
201 +# Specifies that pppd should use a UUCP-style lock on the serial device
202 +# to ensure exclusive access to the device.
205 +# Use the modem control lines.
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".)
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.
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
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.
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
243 +# Don't fork to become a background process (otherwise pppd will do so
244 +# if a serial device is specified).
247 +# Set the assumed name of the remote system for authentication purposes
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}
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.
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
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.
278 +# Specifies that pppd should disconnect if the link is idle for n seconds.
281 +# Disable the IPXCP and IPX protocols.
284 +# ---<End of File>---
285 diff --git a/sample/options.ttyXX b/sample/options.ttyXX
287 index 0000000..d4202f5
289 +++ b/sample/options.ttyXX
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.
294 +# The options.tty file will assign an IP address to each PPP connection
295 +# as it comes up. They must all be distinct!
298 +# options.ttyS1 for com2 under DOS.
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
304 +hostname-s1:hostname
305 diff --git a/sample/pap-secrets b/sample/pap-secrets
307 index 0000000..098971b
309 +++ b/sample/pap-secrets
311 +# Secrets for authentication using PAP
312 +# client server secret IP addresses
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
323 +# INBOUND CONNECTIONS
324 +#client hostname <password> 192.168.1.1
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.
329 +# Every regular user can use PPP and has to use passwords from /etc/passwd
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 "*" -