This file is indexed.

/usr/share/doc/HOWTO/ja-html/Leased-Line-4.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>Leased line Mini HOWTO: PPPD</TITLE>
 <LINK HREF="Leased-Line-5.html" REL=next>
 <LINK HREF="Leased-Line-3.html" REL=previous>
 <LINK HREF="Leased-Line.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="Leased-Line-5.html">$B<!$N%Z!<%8(B</A>
<A HREF="Leased-Line-3.html">$BA0$N%Z!<%8(B</A>
<A HREF="Leased-Line.html#toc4">$BL\<!$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%F%`$,Mn$A$?>l9g$K!"(Bpppd $B$OAj<jB&$,I|5l$9$k$^$GBT$D$3$H(B</LI>
<LI>$B0lEY3NN)$5$l$?@\B3$,@ZCG$5$l$F$7$^$C$?>l9g!"(Bpppd $B$O%b%G%`$r%j%;%C%H(B
$B$7$^$9(B($B%j%;%C%H$9$k$H!"(BDTR $B$,(B OFF $B$K$J$C$F$+$i(B ON $B$K$J$j$^$9(B)$B!#$=$N8e(B
$B:F@\B3$r9T$&$3$H(B</LI>
<LI>$B2s@~>uBV$,$"$^$j$K$b0-2=$7$?>l9g!"(Bpppd $B$O%b%G%`$r%j%;%C%H$7$?8e!"(B
$B:F@\B3$r9T$&$3$H(B</LI>
<LI>$B@\B3$r@)8f$7$F$$$k(B pppd $B<+BN$,Mn$A$F$7$^$C$?>l9g!"$J$s$i$+$N4F;k%7%9(B
$B%F%`$r;H$C$F(B pppd $B$N:F5/F0$r$+$1$k$3$H(B</LI>
</UL>
<P>
<H2><A NAME="ss4.1">4.1 $B@_Dj(B</A>
</H2>

<P>COM2 $B$K%b%G%`$,@\B3$5$l$F$$$F!"$3$A$i$N%"%I%l%9$,!V(BLoc_Ip$B!W!"Aj<j$N%"%I(B
$B%l%9$,!V(BRem_Ip$B!W!"(BMTU $B$O(B 576 $B$H$9$k$H!"(B/etc/ppp/options.ttyS1 $B$O2<5-$N$h$&(B
$B$K$J$j$^$9!#(B
<BLOCKQUOTE><CODE>
<HR>
<PRE>
crtscts
mru 576
mtu 576
passive
Loc_Ip:Rem_Ip
-chap
modem
#noauth
-pap
persist
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>$B$3$A$iB&$,(B 192.168.1.1 $B$G(B $BAj<jB&$,(B 10.1.1.1 $B$J$i(B /etc/options.ttyS1 
$B$O2<5-$N$h$&$K$J$j$^$9!#(B
<BLOCKQUOTE><CODE>
<HR>
<PRE>
crtscts
mru 576
mtu 576
passive
192.168.1.1:10.1.1.1
-chap
modem
#noauth
-pap
persist
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>$BAj<jB&$N%7%9%F%`$N(B options.ttyS1 $B$O2<5-$N$h$&$K$J$j$^$9!#(B
<BLOCKQUOTE><CODE>
<HR>
<PRE>
crtscts
mru 576
mtu 576
passive
10.1.1.1:192.168.1.1
-chap
modem
#noauth
-pap
persist
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>passive $B%*%W%7%g%s$O(B($B:F(B)$B@\B3?t$K@)8B$r$+$1$^$9(B(???)$B!#(Bpersist $B%*%W%7%g%s(B
$B$O!"@\B3$,@Z$l$?>l9g$d:G=i$N@\B3$,<:GT$7$?>l9g$K!"(Bpppd $B$r@\B3BT$A$N>uBV$K(B
$B$7$^$9!#(B
$B%U%!%$%kE>Aw(B(FTP $B$d(B Web $B%V%i%&%8%s%0(B)$B$r$7$J$,$i!"(Btelnet $B$r$h$/$D$+$&>l9g$O!"(B
MTU $B$d(B MRU $B$r(B 296 $B$0$i$$$N>.$5$$CM$K$7$?$[$,$$$$$+$b$7$l$^$;$s!#$3$&$9$k$H(B
$BAj<jB&$+$i$N(B telnet $B$N%l%9%]%s%9$,NI$/$J$k$O$:$G$9!#(B<BR>
telnet $B$N%l%9%]%s%9$r5$$K$7$J$$$J$i!"(BMTU $B$H(B MRU $B$O(B 1500 $B$K$7$?J}$,$$$$$G(B
$B$7$g$&!#(B
noauth $B%*%W%7%g%s$O?7$7$$%G%#%9%H%j%S%e!<%7%g%s$r;H$C$?;~$KI,MW$K$J$k>l9g(B
$B$,$"$j$^$9!#(B
<P>
<H2><A NAME="ss4.2">4.2 $B%9%/%j%W%H(B</A>
</H2>

<P>
<H2><A NAME="ss4.3">4.3 pppd $B$r5/F0$7$F!"(Bpppd $B$rMn$A$J$$$h$&$K$9$k(B</A>
</H2>

<P>$B2<5-$N(B /usr/local/sbin/PRem_Host.sh $B$O(B pppd $B$r5/F0$7$^$9!#$3$N%9%/%j%W%H(B
$B$r5/F0$9$kA0$K(B COM $B%]!<%H$r@_Dj$7$F$*$+$J$1$l$P$$$1$^$;$s(B(Rem_Host $B$O(B
$BAj<jB&$N%[%9%HL>$rI=$7$^$9(B)
<BLOCKQUOTE><CODE>
<HR>
<PRE>
#!/bin/bash
# Optional sleep
#/usr/bin/sleep 30
( /usr/sbin/pppd /dev/ttyS1 115200 ) &amp;
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>$B$3$N%9%/%j%W%H$O%M%C%H%o!<%/!&%+!<%I$r@_Dj$9$k%9%/%j%W%H(B(Debian $B$J$i(B 
/etc/init.d/network)$B$+$i5/F0$9$k$h$&$K$7$F$/$@$5$$!#G0$N$?$a(B sleep $B$N9T$O(B
$B%3%a%s%H%"%&%H$7$F$/$@$5$$!#$=$&$7$?$i!"$^$:(B COM $B%]!<%H$r@_Dj$7$F$$$k$3$H(B
$B$r3NG'$7$F$/$@$5$$!#(Bsetserial $B$r;H$C$F$$$l$P$=$3$+$i8F$S=P$9$h$&$K$7$F(B
$B$/$@$5$$!#(Brc.local $B$+$i8F$S=P$7$F$b$+$^$$$^$;$s!#(B
Debian $B$G$O(B /etc/rc.boot/ $B$H$$$&%G%#%l%/%H%j$,$"$j$^$9!#(B
<A HREF="mailto:rolf@tardis.webster.nl">Rolf Raar </A>$B;a$K$h$k$H(B $B!"(B
$B$3$N%G%#%l%/%H%j$K$"$k%9%/%j%W%H$O!"%U%!%$%kL>$N%"%k%U%!%Y%C%H=g$K<B9T(B
$B$5$l$^$9!#(Bsetserial $B$N%9%/%j%W%H$O!"(B0setserial $B$H$7$F5/F0$5$l$^$9!#(B
2leased-lines $B$H$$$&L>A0$N%9%/%j%W%H$+$i8F$S=P$7$?>l9g!"$=$N%9%/%j%W%H$O(B
0setserial $B$N8e$K<B9T$5$l$^$9!#(B
<P>$B8E$$%7%9%F%`$G$O!"B.EY$r(B 115200 $B$K@_Dj$G$-$J$$$3$H$,$"$j$^$9!#$=$N>l9g$O!"(B
setserial $B$G!V(Bspd_vhi$B!W$H@_Dj$7$F$"$k$H$3$m$r(B 38400 $B$G@\B3$9$k$h$&$K@_Dj(B
$B$7$J$1$l$P$$$1$^$;$s!#(B
<P>persist $B%*%W%7%g%s$,%*!<%P!<$J$i!"(Bip-down $B$r;H$C$F(B pppd $B$r:F5/F0$9$k(B
$B$3$H$b$G$-$^$9!#(B
<P>
<BLOCKQUOTE><CODE>
<HR>
<PRE>
#!/bin/bash
case $2 in
     /dev/ttyS1)
          /usr/bin/sleep 30
          /usr/local/sbin/PRem_Host.sh &amp;
          ;;
esac
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>pppd $B$,Mn$A$k$H!"(Bpersist $B%*%W%7%g%s$+(B ip-up $B%9%/%j%W%H(B($B$I$A$i$K$9$k$+A*Br(B)
$B$,(B pppd $B$N:F5/F0$r$+$1$^$9!#$b$7$3$l$G$b:F5/F0$7$J$$$J$i(B 
/usr/local/sbin/test-Rem_Host-ppp $B%9%/%j%W%H$r;H$C$F!":F5/F0$r$+$1$i$l$^$9!#(B
$B$3$N%9%/%j%W%H$OAj<jB&$K@\B3$5$l$F$$$k%$%s%?%U%'!<%9$,B8:_$9$k$+$I$&$+$r(B
$B%A%'%C%/$7!"$b$7$J$1$l$P(B pppd $B$r5/F0$5$;$^$9!#(B
<BLOCKQUOTE><CODE>
<HR>
<PRE>
#!/bin/bash
if ! ( /sbin/ifconfig | grep Rem_Ip > /dev/null )
then
     if [ ! -f /var/lock/LCK..ttyS1 ]
     then
          # PPP gone
          logger "Rem_Host PPP gone ; restarted"
          /usr/local/sbin/PRem_Host.sh &amp;
     fi
fi
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>$B2<5-$N9T$r(B crontab $B$K@_Dj$7$F(B 5 $BJ,$*$-$K$3$N%9%/%j%W%H$rAv$i$;$^$9!#(B
$B$b$C$HC;$$4V3V$GF0$+$7$F$b$+$^$$$^$;$s$,!";d$O(B 2 $BJ,0J2<$K$O@_Dj$7$J$$J}$,(B
$B$$$$$H;W$$$^$9!#(B
<BLOCKQUOTE><CODE>
<HR>
<PRE>
*/5 * * * *     /usr/local/sbin/test-Rem_Host-ppp
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>crontab $B$rJT=8$9$k$K$O!"!V(Bcrontab -e$B!W$H$7$F$/$@$5$$!#$3$&$9$l$PJT=8$,(B
$B=*$o$k$H!"(Bcron $B$,:F5/F0$7$^$9!#(Bcrontab $B$O!V(BEDITOR$B!W4D6-JQ?t$K@_Dj$5$l$F$$$k(B
$B%(%G%#%?$r5/F0$7$^$9!#$3$N4D6-JQ?t$O!"(B/etc/profile $B$+(B &nbsp;/.profile $B$K5-=R(B
$B$5$l$F$$$^$9(B(export EDITOR=$B$*9%$_$N%(%G%#%?(B)$B!#(B
<P>/etc/inittab $B$+$i(B pppd $B$r5/F0$9$k>l9g$b$"$j$^$9$,!"%F%9%H$7$F$$$^$;$s!#(B
<P>
<H2><A NAME="ss4.4">4.4 $B%k!<%F%#%s%0>pJs$N@_Dj(B</A>
</H2>

<P>$B%G%U%)%k%H!&%k!<%H$O!"(Bdefaultroute $B%*%W%7%g%s$G@_Dj$9$k$+!"(B/etc/ppp/ip-up 
$B%9%/%j%W%H$G2<5-$N$h$&$K$7$^$9!#(B
<BLOCKQUOTE><CODE>
<HR>
<PRE>
#!/bin/bash
case $2 in
     /dev/ttyS1)
          /sbin/route add -net 0.0.0.0 gw Rem_Ip netmask 0.0.0.0
          ;;
esac
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>Ip-up $B$O(B netdate $B$r;H$C$F%7%9%F%`;~7W$rF14|$5$;$k>l9g$K$b;H$o$l$^$9!#(B
<P>ip-up $B$GI,$:%G%U%)%k%H!&%k!<%H$N@_Dj$r$9$kI,MW$O$"$j$^$;$s!#(B
ip-set $B$GAj<jB&$X$N%k!<%F%#%s%0$r@_Dj$7!"Aj<jB&$G$b$3$A$iB&$X$N%k!<%F%#%s%0(B
$B$r@_Dj$9$l$P(B OK $B$G$9!#%M%C%H%o!<%/!&%"%I%l%9$,(B 192.168.1.0 $B$G!"(Bppp $B$N(B
$B%$%s%?!<%U%'!<%9!&%"%I%l%9$,(B 192.168.1.1 $B$H$9$k$H!"Aj<jB&$N(B ip-up $B%9%/%j%W%H(B
$B$O2<5-$NMM$K$J$j$^$9!#(B
<BLOCKQUOTE><CODE>
<HR>
<PRE>
#!/bin/bash
case $2 in
   /dev/ttyS1)
      /sbin/route add -net 192.168.1.0 gw 192.168.1.1 netmask 255.255.255.0
      ;;
esac
</PRE>
<HR>
</CODE></BLOCKQUOTE>
<P>$B!V(Bcase $2$B!W$H!V(B/dev/ttyS1)$B!W$NItJ,$O!"J#?t$N(B ppp $B@\B3$rMxMQ$7$F$$$k>l9g$K(B
$BMxMQ$5$l$^$9!#(BIp-up $B$O@\B3$9$kEY$K5/F0$7!"!V(B/dev/ttySx)$B!W(B $B$H(B $B!V(B;;$B!W$K(B
$B0O$^$l$?%3%^%s%I$r<B9T$9$k$@$1$G$O$J$/!"(BttyS $B$K9g$C$?%k!<%F%#%s%0>pJs$r(B
$B@_Dj$7$^$9!#(B
$B%k!<%F%#%s%0$K$D$$$F$N>\$7$$FbMF$O!"(B
<A HREF="http://metalab.unc.edu/linux/HOWTO/NET-3-HOWTO.html">NET-3-HOWTO</A>$B$N%k!<%F%#%s%0$r2r@b$7$F$$$k%;%/%7%g%s$K:\$C$F$$$^$9!#(B
<P>
<P>
<H2><A NAME="ss4.5">4.5 $B%F%9%H(B</A>
</H2>

<P>$B%b%G%`$r%F%9%H$7$?;~$HF1MM$K!";W$$$D$/$9$Y$F$N%F%9%H$r$7$F$/$@$5$$!#(B
<P>$B$&$^$/$$$C$?$i!"<+E><V$GAj<jB&$K@_CV$9$k%b%G%`$r;}$C$F$$$-$^$7$g$&!#(B<BR>
$B$&$^$/$$$+$J$+$C$?$i!"$^$:(B COM $B%]!<%H$NB.EY@_Dj$N%A%'%C%/$+$i$O$8$a$F$_$F(B
$B$/$@$5$$!#(B<BR>
$B$h$/$d$k%_%9$O!"(BMinicom $B$G%b%G%`$KDL?.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