This file is indexed.

/usr/share/doc/HOWTO/ja-html/VPN-HOWTO-5.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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>VPN HOWTO: ¼Â¹Ô</TITLE>
 <LINK HREF="VPN-HOWTO-6.html" REL=next>
 <LINK HREF="VPN-HOWTO-4.html" REL=previous>
 <LINK HREF="VPN-HOWTO.html#toc5" REL=contents>
</HEAD>
<BODY>
<A HREF="VPN-HOWTO-6.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO-4.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO.html#toc5">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s5">5. ¼Â¹Ô</A></H2>

<P>¤³¤Î¥»¥¯¥·¥ç¥ó¤Ç¤Ï VPN ¥·¥¹¥Æ¥à¤Î¹½ÃÛË¡¤Ë¤Ä¤¤¤Æ½çÈÖ¤ËÀâÌÀ¤·¤Þ¤¹¡£¤Þ¤º¥µ¡¼¥Ð¤«¤é
»Ï¤á¡¢¼¡¤Ë¥¯¥é¥¤¥¢¥ó¥È¤Ø¤È°Ü¤Ã¤Æ¤¤¤­¤Þ¤¹¡£Îã¤È¤¹¤ë¤¿¤á¤Ë¡¢°Û¤Ê¤ë 2 ¼ïÎà¤Î
VPN ÀßÄê¤òɬÍפȤ¹¤ë¾õ¶·¤ò¹Í¤¨¤Æ¤ß¤Þ¤¹¡£
<H2><A NAME="ss5.1">5.1 ·×²è</A>
</H2>

<P>mycompany.com ¤È¤¤¤¦²ñ¼Ò¤ò»ý¤Ã¤Æ¤¤¤ë¤ÈÁÛÁü¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ËܼÒ
¥ª¥Õ¥£¥¹¤Ç¡¢Í½Ì󤵤줿¥Í¥Ã¥È¥ï¡¼¥¯ 192.168.0.0 ¤ò»È¤Ã¤Æ¤ª¤ê¡¢
·ÐÏ©ÀßÄê¤òµö¤¹¤è¤¦¤Ë¥¯¥é¥¹ B ¥Í¥Ã¥È¥ï¡¼¥¯¤ò 256 ¤Î¥¯¥é¥¹ C ¤Ë
¤·¤Æ¤¤¤Þ¤¹¡£¤Á¤ç¤¦¤É 2 ¤Ä¤Î¾®¤µ¤ÊÎ¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¤òÀßÄꤷ¤¿¤È¤³¤í¤Ç¡¢
¤½¤ì¤é¤ò¥Í¥Ã¥È¥ï¡¼¥¯¤ËÄɲä·¤¿¤¤¤È»×¤Ã¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿
¼«Â𤫤é»Å»ö¤·¤Æ¤¤¤ë½¾¶È°÷¤Ë¡¢Èà¤é¤¬¥À¥¤¥ä¥ë¥¢¥Ã¥×¤¹¤ëÂå¤ï¤ê¤Ë
DSL ¤ä ¥±¡¼¥Ö¥ë¥â¥Ç¥à¤ÇÀܳ¤Ç¤­¤ë¤è¤¦¤Ë¤µ¤»¤¿¤¤¤È¤â»×¤Ã¤Æ¤¤¤Þ¤¹¡£
»Ï¤á¤ë¤¿¤á¤Ë¤Ï¾¯¤·¤Ð¤«¤ê·×²è¤òΩ¤Æ¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
<P>¤½¤ì¤¾¤ì¤ÎÎ¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¤ÇɬÍפ˱þ¤¸¤Æ³ÈÄ¥¤Ç¤­¤ë¤è¤¦¡¢¥¯¥é¥¹ C
¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÈϰϤò³ä¤êÅö¤Æ¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£¤½¤³¤Ç¡¢192.168.10.0
¤È 192.168.11.0 ¥Í¥Ã¥È¤òͽÌó¤·¤Þ¤¹¡£¼«Âð¥æ¡¼¥¶¤ËÂФ·¤Æ¤â
VPN ¥µ¡¼¥Ð¦¤Ç¥Þ¥¹¥«¥ì¡¼¥É¤¹¤ëɬÍפΤʤ¤½½Ê¬¤Ê¿ô¤ò³ÎÊݤ¹¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£
³Æ¥¯¥é¥¤¥¢¥ó¥È¤Ï¤½¤ì¼«¿È¤ÎÆâÉô IP ¤ò¼èÆÀ¤·¤Þ¤¹¡£¤½¤³¤Ç¡¢¤½¤Î¤¿¤á¤Ë
¾¤Î¥¯¥é¥¹ C¡¢192.168.40.0 ¤òͽÌ󤹤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
º£¤ä¤é¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¤Î¤Ï¡¢¥ë¡¼¥¿¤Ë¤½¤ì¤é¤ÎÈϰϤòÄɲ乤뤳¤È¤Ç¤¹¡£
»ä¤¿¤Á¤Î²ñ¼Ò¤¬¡¢OC1 ¤òÄ̲᤹¤ë¥È¥é¥Õ¥£¥Ã¥¯Á´¤Æ¤ò¼è¤ê°·¤¦¾®¤µ¤Ê Cisco
(192.168.254.254) ¤ò½êÍ­¤·¤Æ¤¤¤ë¤È»×¤Ã¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì¤é¤ÎͽÌ󤵤줿
¥Í¥Ã¥È¤«¤é VPN ¥µ¡¼¥Ð (192.168.40.254) ¤Ø¸þ¤«¤¦¥È¥é¥Õ¥£¥Ã¥¯¤ò
Cisco ¾å¤Ç·ÐÏ©ÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
»ä¤Ï¸å¤ÇÌÀ¤«¤¹Íýͳ¤Î¤¿¤á¡¢VPN ¥µ¡¼¥Ð¤ò¼«Âð¥æ¡¼¥¶¤Î¥Í¥Ã¥È¤ËÁȤßÆþ¤ì¤Þ¤¹¡£
¥µ¡¼¥Ð¤Î³°Éô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ï vpn.mycompany.com ¡¢
ÆâÉô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ï vpn-internal.mycompany.com ¤È̾¤Å¤±¤ë¤³¤È¤Ë
¤·¤Þ¤¹¡£ 
<P>³°ÉôÈÖ¹æ¤Ë¤Ä¤¤¤Æ¡¢¤Ï¤Ã¤­¤ê¤ÈÃΤäƤª¤¯É¬ÍפϤ¢¤ê¤Þ¤»¤ó¡£
ISP ¤Ë¤è¤Ã¤Æ³ä¤êÅö¤Æ¤é¤ì¤¿¼«Ê¬¼«¿È¤ÎÈÖ¹æ¤òÃΤäƤ¤¤ë¤Ù¤­¤Ç¤¹¡£
<H2><A NAME="ss5.2">5.2 ¥Ä¡¼¥ë¤ò½¸¤á¤ë</A>
</H2>

<P>¿¾¯¡¢¥½¥Õ¥È¥¦¥§¥¢¤¬É¬ÍפˤʤäƤ­¤Þ¤·¤¿¡£
¼¡¤Ëµó¤²¤ë¥Ñ¥Ã¥±¡¼¥¸¤ò¼èÆÀ¤·¤Æ¡¢»ØÄꤵ¤ì¤¿¾ì½ê¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£
<H3>¥µ¡¼¥Ð¤ËÂФ·¤Æ - </H3>

<P>
<UL>
<LI>pppd (¥Ð¡¼¥¸¥ç¥ó 2.3 °Ê¹ß)</LI>
<LI>ssh (¥Ð¡¼¥¸¥ç¥ó 1.2.26 °Ê¹ß)</LI>
</UL>
<H3>¥¯¥é¥¤¥¢¥ó¥È¤ËÂФ·¤Æ - </H3>

<P>
<UL>
<LI>pppd (¥µ¡¼¥Ð¤ÈƱ¤¸¥Ð¡¼¥¸¥ç¥ó)</LI>
<LI>ssh</LI>
<LI>
<A HREF="ftp://ftp.vein.hu/ssa/contrib/mag/pty-redir-0.1.tar.gz">pty-redir</A></LI>
</UL>
<H2><A NAME="ss5.3">5.3 ¥µ¡¼¥Ð - ¥«¡¼¥Í¥ë¤ò¹½ÃÛ¤¹¤ë</A>
</H2>

<P>ºÇ½é¤Ë¡¢Â¿Ê¬¡¢¤¢¤Ê¤¿¤Ï¥µ¡¼¥Ð¤Î¤¿¤á¤Ë¥«¡¼¥Í¥ë¤òºÆ¹½ÃÛ¤¹¤ëɬÍפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡£
´ðËܥͥåȥ¥¯¤ä¤½¤Î¾¤ÎɬÍפʹàÌܤ˲䨤ơ¢É¬¤º°Ê²¼¤Î¥ª¥×¥·¥ç¥ó¤ò¥ª¥ó¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£
¤â¤·°ÊÁ°¤Ë¥«¡¼¥Í¥ë¤ò¹½ÃÛ¤·¤¿¤³¤È¤¬¤Ê¤±¤ì¤Ð¡¢
<A HREF="http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</A>¤òÆɤó¤Ç¤¯¤À¤µ¤¤¡£
[ÌõÃí¡§ÆüËܸìÌõ¤Ï 
<A HREF="http://www.linux.or.jp/JF/JFdocs/Kernel-HOWTO.html">http://www.linux.or.jp/JF/JFdocs/Kernel-HOWTO.html</A> ¤Ë¤¢¤ê¤Þ¤¹¡£]
<P>2.0 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<UL>
<LI>CONFIG_FIREWALL</LI>
<LI>CONFIG_IP_FORWARD</LI>
<LI>CONFIG_IP_FIREWALL</LI>
<LI>CONFIG_IP_ROUTER</LI>
<LI>CONFIG_PPP</LI>
</UL>
<P>2.2 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<UL>
<LI>CONFIG_FIREWALL</LI>
<LI>CONFIG_IP_ADVANCED_ROUTER</LI>
<LI>CONFIG_IP_FIREWALL</LI>
<LI>CONFIG_IP_ROUTER</LI>
<LI>CONFIG_PPP</LI>
</UL>
<H2><A NAME="ss5.4">5.4 ¥µ¡¼¥Ð - ¥Í¥Ã¥È¥ï¡¼¥¯¤òÀßÄꤹ¤ë</A>
</H2>

<P>¥Í¥Ã¥È¥ï¡¼¥¯¥«¡¼¥É 1 Ë礷¤«¤Ê¤¤¥µ¡¼¥Ð¤ò¹½ÃÛ¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢
¤â¤¦ 1 ËçÇã¤Ã¤Æ¡¢¿·¤¿¤ËÇÛÀþ¤¹¤ë¤³¤È¤ò¸¡Æ¤¤¹¤ë¤è¤¦´«¤á¤Þ¤¹¡£
¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÈó¸ø³«À­¤ò¤½¤Î¤Þ¤Þ¤Ë¤·¤Æ¤ª¤¯°ìÈÖÎɤ¤ÊýË¡¤Ï¡¢¤½¤ì¤ò
¤½¤ì¼«¿È¤ÎÀþ¤Ë³ä¤êÅö¤Æ¤ë¤³¤È¤Ç¤¹¡£¤â¤· 2 Ëç¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥«¡¼¥É
¤ò»ý¤Ã¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢¤½¤ì¤¾¤ì¤ÎÀßÄêÊýË¡¤òÃΤëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
»ä¤¿¤Á¤Ï³°Éô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë eth0¡¢ÆâÉô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë eth1 ¤ò»È¤¤¤Þ¤¹¡£
<H3>¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÀßÄꤹ¤ë</H3>

<P>ºÇ½é¤Ë¥µ¡¼¥Ð¤Î³°Éô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
´û¤Ë¤É¤¦¤¹¤ì¤ÐÎɤ¤¤«ÃΤäƤ¤¤ë¤Ï¤º¤Ç¤¹¤·¡¢Â¿Ê¬¡¢´û¤ËÀßÄꤷ¤Æ¤·¤Þ¤Ã¤¿»ö¤Ç¤·¤ç¤¦¡£
¤Þ¤À¤Ç¤¢¤ì¤Ð¡¢¤¹¤°¤Ë¤ä¤Ã¤Æ¤¯¤À¤µ¤¤¡£¤É¤¦¤¹¤ì¤ÐÎɤ¤¤«Ê¬¤«¤é¤Ê¤±¤ì¤Ð¡¢Ìá¤Ã¤Æ
<A HREF="http://www.linuxdoc.org/HOWTO/NET3-4-HOWTO.html">Networking HOWTO</A>
¤òÆɤó¤Ç¤¯¤À¤µ¤¤¡£
<P>¤Ç¤ÏÆâÉô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÀßÄꤷ¤Þ¤¹¡£ÈÖ¹æ¤Ï»ä¤¿¤Á¤ÎÁªÂò¤Ë¤è¤Ã¤Æ¡¢
¥µ¡¼¥Ð¤ÎÆâÉô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤¬ 192.168.40.254 ¤Ç¤¹¡£
¤Ç¤Ï¤½¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÀßÄꤷ¤Þ¤·¤ç¤¦¡£
<P>2.0 ¥«¡¼¥Í¥ë¤Ç¤Ï¼¡¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤ - 
<P>
<PRE>
# /sbin/ifconfig eth1 192.168.40.254 netmask 255.255.255.0 broadcast 192.168.40.255
# /sbin/route add -net 192.168.40.0 netmask 255.255.255.0 dev eth1
</PRE>
<P>2.2 ¥«¡¼¥Í¥ë¤Ç¤Ï¼¡¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤ - 
<P>
<PRE>
# /sbin/ifconfig eth1 192.168.40.254 netmask 255.255.255.0 broadcast 192.168.40.255
</PRE>
<P>¤½¤ì¤Ç´ðËÜ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤¬ÍѰդǤ­¤Þ¤¹¡£¤³¤ì¤ÇξÊý¤Î
¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤è¤Ã¤Æ¥µ¡¼¥Ð¤Ë·Ò¤¬¤Ã¤¿¥Þ¥·¥ó¤ËÏä·¤«¤±¤ë¤³¤È¤¬
¤Ç¤­¤Þ¤¹¡£
<H3>·ÐÏ©¤òÀßÄꤹ¤ë</H3>

<P>»ä¤¿¤Á¤Ï¥í¡¼¥«¥ë¥Í¥Ã¥È¤Ë¤¢¤ë¥Þ¥·¥ó¤ÈÏ乤³¤È¤Ï¤Ç¤­¤ëÍͤˤʤê¤Þ¤·¤¿¤¬¡¢
ÆâÉô¥Í¥Ã¥È¥ï¡¼¥¯¤Î»Ä¤ê¤È¤ÏÏ乤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£
¤½¤¦¤¹¤ë¤Ë¤Ï¤â¤¦¿ô¹Ô¥³¡¼¥É¤¬É¬ÍפǤ¹¡£Â¾¤Î¥µ¥Ö¥Í¥Ã¥È¤Ë¤¢¤ë¤Û¤«¤Î¥Þ¥·¥ó
¤ËÅþ㤹¤ë¤¿¤á¤Ë¤Ï¡¢¥È¥é¥Õ¥£¥Ã¥¯¤¬ Cisco ¥ë¡¼¥¿¤Ë¸þ¤«¤¦¤è¤¦¤Ê·ÐÏ©¤ò
ÃΤëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹ - 
<PRE>
# /sbin/route add -net 192.168.0.0 gw 192.168.254.254 netmask 255.255.0.0 dev eth1
</PRE>
<P>¤½¤Î¹Ô¤Ï¡¢192.168.0.0 ¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¹Ô¤¯¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤¤¤¯¤Ä¤«¤Î¥È¥é¥Õ¥£¥Ã¥¯
¤Ï eth1 ¤ò½Ð¤ë¤Ù¤­¤Ç¡¢¤½¤ì¤Ï Cisco ¤ËÅÁ¤¨¤é¤ì¤ë¤Ù¤­¤Ç¤¢¤ë¤È¤¤¤¦¤³¤È¤ò
¥«¡¼¥Í¥ë¤ËÅÁ¤¨¤Þ¤¹¡£
¥ë¡¼¥Æ¥£¥ó¥°¥Æ¡¼¥Ö¥ë¤¬¥Í¥Ã¥È¥Þ¥¹¥¯¤Î¥µ¥¤¥º¤Ç·è¤á¤é¤ì¤ë¤¿¤á¡¢
¥í¡¼¥«¥ë¥Í¥Ã¥È¤Ë¸þ¤«¤¦¥È¥é¥Õ¥£¥Ã¥¯¤Ë¤Ï¡¢¤Þ¤À¸þ¤«¤¦¤Ù¤­¾ì½ê¤¬Ê¬¤«¤Ã¤Æ¤¤¤Þ¤¹¡£
¤â¤·Â¾¤Ë¤â¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÃæ¤ËÆâÉôŪ¤Ê¥Í¥Ã¥È¥ï¡¼¥¯¤¬¤¢¤ë¤Ê¤é¡¢¤½¤ì¤¾¤ì¤Ë
ÂФ·¤Æ¡¢¾åµ­¤Î¤è¤¦¤Ê»ØÄê¤ò¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
<H3>¥Õ¥£¥ë¥¿µ¬Â§¤òºîÀ®¤¹¤ë</H3>

<P>OK, ɬÍפȤµ¤ìÆÀ¤ë¥Þ¥·¥óÁ´¤Æ¤ËÅþã¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
º£Å٤ϡ¢VPN ¥µ¡¼¥Ð¤òÄ̤·¤Æ¥¢¥¯¥»¥¹¤òµö¤¹¤«µö¤µ¤Ê¤¤¤«¤È¤¤¤¦¡¢
¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤Î¥Õ¥£¥ë¥¿µ¬Â§¤òµ­½Ò¤·¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
<P><CODE>ipfwadm</CODE> ¤Çµ¬Â§¤ò»ØÄꤹ¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹ - 
<P>
<PRE>
# /sbin/ipfwadm -F -f
# /sbin/ipfwadm -F -p deny
# /sbin/ipfwadm -F -a accept -S 192.168.40.0/24 -D 192.168.0.0/16
# /sbin/ipfwadm -F -a accept -b -S 192.168.10.0/24 -D 192.168.0.0/16
# /sbin/ipfwadm -F -a accept -b -S 192.168.11.0/24 -D 192.168.0.0/16
</PRE>
<P><CODE>ipchains</CODE> ¤Çµ¬Â§¤ò»ØÄꤹ¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹ - 
<P>
<PRE>
# /sbin/ipchains -F forward
# /sbin/ipchains -P forward DENY
# /sbin/ipchains -A forward -j ACCEPT -s 192.168.40.0/24 -d 192.168.0.0/16
# /sbin/ipchains -A forward -j ACCEPT -b -s 192.168.10.0/24 -d 192.168.0.0/16
# /sbin/ipchains -A forward -j ACCEPT -b -s 192.168.11.0/24 -d 192.168.0.0/16
</PRE>
<P>¤³¤ì¤Ï¥«¡¼¥Í¥ë¤Ë¡¢192.168.40.0/24 ¥Í¥Ã¥È¥ï¡¼¥¯¤«¤éÍè¤Æ 192.168.0.0/16
¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¸þ¤«¤¦¤â¤Î¤ò½ü¤¤¤¿¡¢Á´¤Æ¤Î¥È¥é¥Õ¥£¥Ã¥¯¤òµñÀ䤹¤ë¤è¤¦¤Ë
ÅÁ¤¨¤Þ¤¹¡£¤½¤ì¤Ï¤Þ¤¿¡¢192.168.10.0/24 ¤È 192.168.0.0/16 ¥Í¥Ã¥È¤È¤Î´Ö¤Ç
¤ä¤ê¤È¤ê¤µ¤ì¤ë¥È¥é¥Õ¥£¥Ã¥¯¤òµö²Ä¤¹¤ë¤È¤¤¤¦¤³¤È¤ò¤âÅÁ¤¨¤Þ¤¹¡£
192.168.11.0 ¥Í¥Ã¥È¤ËÂФ·¤Æ¤âƱÍͤǤ¹¡£¤³¤ì¤é¤ÎºÇ¸å 2 ¤Ä¤ÏÁÐÊý¸þ¤Îµ¬Â§¤Ç¡¢
¤³¤ì¤ÏÁÐÊý¸þ¤Ë¤ä¤ê¤È¤ê¤Ç¤­¤ë¤è¤¦·ÐÏ©¤òÄê¤á¤ë¤¿¤á¤Ë¤Ï½ÅÍפʤ³¤È¤Ç¤¹¡£
<H3>·ÐÏ©¤òÀßÄꤹ¤ë</H3>

<P>¼«Âð¥æ¡¼¥¶¤Ë¤È¤Ã¤Æ¤Ï¡¢¤³¤³¤Þ¤Ç¤ÇÁ´¤Æ¤¬¤¦¤Þ¤¯Æ°ºî¤¹¤ë¤Ç¤·¤ç¤¦¡£
¤·¤«¤·¡¢Î¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¤Î¤¿¤á¤Ë¤Ï¤¤¤¯¤é¤«·ÐÏ©¤òÀßÄꤷ¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
¤Þ¤ººÇ½é¤Ë¡¢¥á¥¤¥ó¥ë¡¼¥¿¡¢¤¹¤Ê¤ï¤Á Cisco ¤Ë¡¢Î¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹
¤Ï VPN ¥µ¡¼¥Ð¤Î±Æ¤Ë±£¤ì¤Æ¤¤¤ë¤È¤¤¤¦¤³¤È¤ò¶µ¤¨¤Æ¤ä¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤Ç¤¹¤«¤é Cisco ¤ËÂФ·¤Æ¡¢Î¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¹Ô¤­¤Î¥È¥é¥Õ¥£¥Ã¥¯¤ò
VPN ¥µ¡¼¥Ð¤ËÁ÷¤ë¤è¤¦¤Ê·ÐÏ©¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¤½¤ì¤¬¤¹¤ó¤À¤é¡¢º£ÅÙ¤ÏÎ¥¤ì¤¿¥ª¥Õ¥£¥¹¤Ë¸þ¤«¤¦¥È¥é¥Õ¥£¥Ã¥¯¤ò¤É¤¦¤¹¤Ù¤­¤«
VPN ¥µ¡¼¥Ð¤Ë¶µ¤¨¤Æ¤ä¤é¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£
¤³¤ì¤ò¤¹¤ë¤Ë¤Ï <CODE>route</CODE> ¥³¥Þ¥ó¥É¤ò¥µ¡¼¥Ð¤Ç¼Â¹Ô¤·¤Þ¤¹¡£
<CODE>route</CODE> ¥³¥Þ¥ó¥É¤òÆ°ºî¤µ¤»¤ë¾å¤Ç¤ÎÍ£°ì¤ÎÌäÂê¤Ï¡¢
¥ê¥ó¥¯¤Ï³ÎΩ¤µ¤ì¤Æ¤¤¤Ê¤¯¤Æ¤Ï¤Ê¤é¤º¡¢¤â¤·ÀÚ¤ì¤Æ¤·¤Þ¤¦¤È·ÐÏ©¤¬¼º¤ï¤ì¤Æ
¤·¤Þ¤¦¤È¤¤¤¦¤³¤È¤Ç¤¹¡£²ò·èºö¤Ï¡¢¥¯¥é¥¤¥¢¥ó¥È¤¬Àܳ¤·¤Æ¤­¤¿¤é
·ÐÏ©¤òÄɲ䷤Ƥä¤ë¡¢¤¢¤ë¤¤¤Ï¡¢route ¥³¥Þ¥ó¥É¤ÏɬÍװʾå¤Ë¼Â¹Ô¤·¤Æ¤âÌäÂê̵¤¤¤Î¤Ç¡¢
¤è¤ê´Êñ¤ÊÊýË¡¤È¤·¤Æ¤Ï¡¢¤½¤ì¤òÅÙ¡¹¼Â¹Ô¤·¤Æ¤ä¤ë¤³¤È¤Ç¤¹¡£
¤Ç¤Ï¡¢¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤Æ¡¢¿ôʬËè¤Ë¼Â¹Ô¤µ¤ì¤ë¤è¤¦¤½¤ì¤ò crontab 
¤Ë²Ã¤¨¤Æ¤¯¤À¤µ¤¤¡£¤½¤ÎÃæ¤Ë¤Ï¼¡¤Î¤è¤¦¤Ë½ñ¤¤¤Æ¤¯¤À¤µ¤¤ - 
<P>
<PRE>
/sbin/route add -net 192.168.11.0 gw 192.168.10.253 netmask 255.255.255.0
/sbin/route add -net 192.168.10.0 gw 192.168.11.253 netmask 255.255.255.0
</PRE>
<H2><A NAME="ss5.5">5.5 ¥µ¡¼¥Ð - <CODE>pppd</CODE> ¤òÀßÄꤹ¤ë</A>
</H2>

<P>¤µ¤Æº£ÅÙ¤Ï VPN Àܳ¤ò¼è¤ê°·¤¦¤¿¤á¤Ë¥µ¡¼¥Ð¤Î pppd ¤òÀßÄꤷ¤Þ¤·¤ç¤¦¡£
¤â¤·¤³¤Î¥µ¡¼¥Ð¤ò¡¢¥À¥¤¥ä¥ë¥¢¥Ã¥×¥æ¡¼¥¶¤ò½èÍý¤¹¤ë¤Î¤Ë»È¤Ã¤Æ¤¤¤ë¡¢
¤¢¤ë¤¤¤Ï¤¢¤Ê¤¿¼«¿È¤¬¥À¥¤¥ä¥ë¤¹¤ë¤Î¤Ë»È¤Ã¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢¤³¤ì¤é¤Î
Êѹ¹¤¬¤½¤ì¤é¤Î¥µ¡¼¥Ó¥¹¤Ë±Æ¶Á¤òÍ¿¤¨¤ë¤«¤â¤·¤ì¤Ê¤¤¤È¤¤¤¦¤³¤È¤ò³Ð¤¨¤Æ
¤ª¤¯¤Ù¤­¤Ç¤¹¡£¤³¤Î¥»¥¯¥·¥ç¥ó¤ÎºÇ¸å¤Ç¡¢¤¤¤«¤Ë¤·¤Æ¾×Æͤò²óÈò¤¹¤ë¤«¸¡Æ¤
¤·¤Þ¤¹¡£
<H3><CODE>/etc/ppp/</CODE> </H3>

<P>¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ï¤¿¤¯¤µ¤ó¤Î¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£Â¿Ê¬
¤¢¤Ê¤¿¤Ï´û¤Ë¡¢<CODE>options</CODE> ¤È¸Æ¤Ð¤ì¤ë¥Õ¥¡¥¤¥ë¤ò»ý¤Ã¤Æ¤¤¤ë
¤Ç¤·¤ç¤¦¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤Ï <CODE>pppd</CODE> ¤ËÂФ¹¤ëÂç°èŪ¤Ê¥ª¥×¥·¥ç¥ó
¤ÎÁ´¤Æ¤¬Æþ¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤Ï <CODE>pppd</CODE> ¤Î
¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ç̵¸ú¤Ë¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£
<H3><CODE>/etc/ppp/options</CODE> </H3>

<P><CODE>options</CODE> ¥Õ¥¡¥¤¥ë¤Ï¾¯¤Ê¤¯¤È¤â¼¡¤Î¤è¤¦¤Êµ­½Ò¤ò
´Þ¤ó¤Ç¤¤¤ë¤Ï¤º¤Ç¤¹ - 
<P>
<PRE>
ipcp-accept-local
ipcp-accept-remote
proxyarp
noauth
</PRE>
<P>ºÇ½é¤Î 2 ¹Ô¤Ï <CODE>pppd</CODE> ¤Ë¡¢Â¾¤Îü¤¬ IP ¥¢¥É¥ì¥¹¤È¤·¤Æ»ØÄꤷ¤¿¤â¤Î¤ò
¼õ¤±Æþ¤ì¤ë¤è¤¦»Ø¼¨¤·¤Þ¤¹¡£¤³¤ì¤ÏÎ¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¤ËÀܳ¤¹¤ë¤È¤­¤Ë¤Ï
ɬÍפǤ¹¤¬¡¢¤·¤«¤·¼«Âð¤Î¥æ¡¼¥¶¤ËÀܳ¤·¤Æ¤¤¤ë¤Î¤Ê¤é¤Ð̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
¤½¤ì¤Ï¥µ¡¼¥Ð¤¬¥¢¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤ò˸¤²¤Ï¤·¤Þ¤»¤ó¤Î¤ÇÍ­¸ú¤Ë¤·¤Æ¤ª¤¤¤Æ
¹½¤¤¤Þ¤»¤ó¡£¤½¤ì¤Ï¥¯¥é¥¤¥¢¥ó¥È¤¬µá¤á¤Æ¤­¤¿¤³¤È¤ò¼õ¤±Æþ¤ì¤ÆÎɤ¤
¤È¤¤¤¦¤³¤È¤òÅÁ¤¨¤ë¤À¤±¤Ç¤¹¡£
<P>3 ¹ÔÌܤÏÈó¾ï¤Ë½ÅÍפǤ¹¡£<CODE>pppd</CODE> ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ë¤è¤ë¤È - 
<P>
<PRE>
proxyarp
       ¤³¤Î¥·¥¹¥Æ¥à¤Î ARP [Address Resolution Protocol] ¥Æ¡¼¥Ö¥ë¤ËÂФ·¤Æ
       ¥Ô¥¢¤Î IP ¥¢¥É¥ì¥¹¤È¤³¤Î¥·¥¹¥Æ¥à¤Î¥¤¡¼¥µ¥Í¥Ã¥È¥¢¥É¥ì¥¹¤òÉÕ¤±²Ã¤¨¤Þ¤¹¡£
       ¤³¤ì¤Ë¤è¤Ã¤Æ¡¢¥Ô¥¢¤¬Â¾¤Î¥·¥¹¥Æ¥à¤«¤é¸«¤Æ¥í¡¼¥«¥ë¤Ê¥¤¡¼¥µ¥Í¥Ã¥È¤Ë
       ¤¢¤ë¤è¤¦¤Ë¸«¤¨¤ë¤È¤¤¤¦¸ú²Ì¤¬¤â¤¿¤é¤µ¤ì¤Þ¤¹¡£
</PRE>
<P>¤½¤ì¤¬°Ù¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð ¥í¡¼¥«¥ë¤Ê¥È¥é¥Õ¥£¥Ã¥¯¤¬¥È¥ó¥Í¥ë¤òÄ̤äÆ
Ìá¤Ã¤ÆÍè¤ì¤Ê¤¯¤Ê¤ë¤¿¤á¡¢¤³¤ì¤ÏÈó¾ï¤Ë½ÅÍפǤ¹¡£
<P>ºÇ¸å¤Î¹Ô¤âƱ¤¸¤¯½ÅÍפǤ¹¡£¤³¤ì¤Ï <CODE>pppd</CODE> ¤Ë¥æ¡¼¥¶Ì¾¤È¥Ñ¥¹¥ï¡¼¥É
̵¤·¤ÇÀܳ¤òµö¤¹¤è¤¦»Ø¼¨¤·¤Þ¤¹¡£¤³¤ì¤Ï <CODE>sshd</CODE> ¤Ë¤è¤Ã¤Æ´û¤Ë
ǧ¾Ú¤¬°Ù¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç°ÂÁ´¤Ç¤¹¡£
<H3>¾×Æͤò²óÈò¤¹¤ë </H3>

<P>¤â¤·¤¢¤Ê¤¿¤¬ <CODE>pppd</CODE> ¤Ç¾¤Î¥µ¡¼¥Ó¥¹¤ò°·¤Ã¤Æ¤¤¤ë¤Ê¤é¡¢¤½¤ì¤é¤Î
¾¤Î¥µ¡¼¥Ó¥¹¤ÎÀßÄê¤Ï VPN ¥·¥¹¥Æ¥à¤¬É¬ÍפȤ·¤Æ¤¤¤ë¤â¤Î¤È¤Ï°Û¤Ê¤Ã¤Æ¤¤¤ë¤«¤â
ÃΤì¤Ê¤¤¤È¤¤¤¦¤³¤È¤ò¹Í¤¨¤Æ¤ß¤ë¤Ù¤­¤Ç¤¹¡£<CODE>pppd</CODE> ¤Ï 
<CODE>/etc/ppp/options</CODE> ¥á¥¤¥ó¥ª¥×¥·¥ç¥ó¥Õ¥¡¥¤¥ë¤ÎÃæ¤Î¥ª¥×¥·¥ç¥ó
¤Ï¼Â¹Ô»þ¤Ë»ØÄꤵ¤ì¤¿¥ª¥×¥·¥ç¥ó¤Ë¤è¤Ã¤Æ̵¸ú¤Ë¤Ç¤­¤Ê¤¤¤è¤¦¤ËÀ߷פµ¤ì¤Æ
¤¤¤Þ¤¹¡£¤³¤ì¤Ï¥»¥­¥å¥ê¥Æ¥£¾å¤ÎÍýͳ¤Ëµò¤ê¤Þ¤¹¡£¾×ÆͤòÈò¤±¤ë¤¿¤á¡¢
¤É¤Î¥ª¥×¥·¥ç¥ó¤¬¾×Æͤòµ¯¤³¤·¤Æ¤¤¤ë¤«ÆÃÄꤷ¤Æ²¼¤µ¤¤¡£¤½¤·¤Æ¤½¤ì¤é¤ò
¥á¥¤¥ó¥Õ¥¡¥¤¥ë¤«¤é <CODE>pppd</CODE> ¤ÎÆÃÄê¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¼Â¹ÔÃæ¤Ë
¥í¡¼¥É¤µ¤ì¤ëʬΥ¤µ¤ì¤¿¥ª¥×¥·¥ç¥ó¥Õ¥¡¥¤¥ë¤Ë°Ü¤·¤Æ¤¯¤À¤µ¤¤¡£
<H2><A NAME="ss5.6">5.6 ¥µ¡¼¥Ð - <CODE>sshd</CODE> ¤òÀßÄꤹ¤ë</A>
</H2>

<P>¼¡¤Ëµó¤²¤ë¤Î¤Ï»ä¤Î <CODE>/etc/sshd_config</CODE>¥Õ¥¡¥¤¥ë¤ÎÆâÍƤǤ¹¡£
¤¢¤Ê¤¿¤Î¥Õ¥¡¥¤¥ë¤â¡¢Æ±¤¸¤«¡¢¤Þ¤¿¤Ï»÷¤¿·Á¼°¤ò¤·¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹ - 
<P>
<PRE>
# This is the ssh server system wide configuration file.

Port 22
ListenAddress 0.0.0.0
HostKey /etc/ssh_host_key
RandomSeed /etc/ssh_random_seed
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationInterval 3600
PermitRootLogin yes
IgnoreRhosts yes
StrictModes yes
QuietMode no
FascistLogging yes
CheckMail no
IdleTimeout 3d
X11Forwarding no
PrintMotd no
KeepAlive yes
SyslogFacility DAEMON
RhostsAuthentication no
RhostsRSAAuthentication no
RSAAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
UseLogin no
</PRE>
<P>µ¤¤ò¤Ä¤±¤Æ¤ª¤¯¤Ù¤­½ÅÍפÊÅÀ¤Ï¡¢¥Ñ¥¹¥ï¡¼¥Éǧ¾Ú¤Ï &quot;r&quot; ¥µ¡¼¥Ó¥¹Á´¤Æ
¤Ë¤ª¤¤¤Æ̵¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£»ä¤Ï¡¢¥á¡¼¥ë¥Á¥§¥Ã¥¯¤ä¤½¤ÎÆü¤Î
¥á¥Ã¥»¡¼¥¸¤â¡¢¥¯¥é¥¤¥¢¥ó¥È¦¤«¤é <CODE>pppd</CODE> ¤òº®Í𤵤»ÆÀ¤ë¤Î¤Ç
̵¸ú¤Ë¤·¤Æ¤¤¤Þ¤¹¡£root ¥í¥°¥¤¥ó¤Ïµö²Ä¤·¤Æ¤¤¤Þ¤¹¤¬¡¢¤½¤ì¤Ï¥­¡¼¤Ê¤·¤Ë¤Ï¼Â¹Ô¤Ç¤­¤Ê¤¤¤¿¤á¡¢
½½Ê¬¤Ë°ÂÁ´¤Ç¤¹¡£
<H2><A NAME="user-accounts"></A> <A NAME="ss5.7">5.7 ¥µ¡¼¥Ð - ¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¤òÀßÄꤹ¤ë </A>
</H2>

<P>¼¡¤Ï¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¤òÀßÄꤷ¤Þ¤¹¡£
<H3><CODE>vpn-users</CODE> ¥°¥ë¡¼¥×¤òÄɲ乤ë</H3>

<P>¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>
<PRE>
# /usr/sbin/groupadd vpn-users
</PRE>
<P>¤Ç¤Ï <CODE>/etc/group</CODE> ¥Õ¥¡¥¤¥ë¤ò cat ¤·¤ÆºÇ¸å¤Î¹Ô¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£
¤½¤ì¤Ï vpn-users ¥°¥ë¡¼¥×¤Î¤¿¤á¤Î¥¨¥ó¥È¥ê¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£
3 ÈÖÌܤΥե£¡¼¥ë¥É¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ì¤Ï¥°¥ë¡¼¥× ID (GID) ¤Ç¤¹¡£
¤¹¤°¤ËɬÍפˤʤë¤Î¤Ç¤½¤ì¤ò½ñ¤­Î±¤á¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ÎÎã¤Ç¤Ï GID ¤Ï 101 ¤Ç¤¹¡£
<H3><CODE>vpn-users</CODE> ¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤òºî¤ë</H3>

<P>»ä¤¿¤Á¤Ï¥æ¡¼¥¶Á´¤Æ¤Î¤¿¤á¤Ë°ì¤Ä¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤ò»È¤ª¤¦¤È¤·¤Æ¤¤¤Þ¤¹¡£
¤Ç¤Ï¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤ -
<P>
<PRE>
# mkdir /home/vpn-users
</PRE>
<H3><CODE>.ssh</CODE> ¥Ç¥£¥ì¥¯¥È¥ê</H3>

<P><CODE>.ssh</CODE> ¥Ç¥£¥ì¥¯¥È¥ê¤ò <CODE>vpn-users</CODE> ¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê
¤ÎÃæ¤ËºîÀ®¤·¤Þ¤¹¡£
<P>
<PRE>
# mkdir /home/vpn-users/.ssh
</PRE>
<H3>¥æ¡¼¥¶¤òÄɲ乤ë</H3>

<P>¤µ¤ÆÌÌÇò¤¤Éôʬ¤Ë¤ä¤Ã¤Æ¤­¤Þ¤·¤¿¡£¤³¤ì¤«¤é <CODE>/etc/passwd</CODE> ¥Õ¥¡¥¤¥ë¤ò
¼ê¤ÇÊÔ½¸¤¹¤ë¤ï¤±¤Ç¤¹¡£:) Ä̾ï¤Ï¥·¥¹¥Æ¥à¤ËÁàºî¤µ¤»¤ë¥Õ¥¡¥¤¥ë¤Ê¤Î¤Ç¤¹¤¬¡¢
¤³¤¦¤¤¤¦ÊѤï¤Ã¤¿ÀßÄê¤ò¹Ô¤¦¤È¤­¤Ë¤Ï¼«Ê¬¤Ç½ñ¤­´¹¤¨¤ëÊý¤¬´Êñ¤Ç¤¹¡£
ºÇ½é¤Ë <CODE>/etc/passwd</CODE> ¥Õ¥¡¥¤¥ë¤ò³«¤¤¤Æ¤½¤³¤Ë²¿¤¬¤¢¤ë¤«
¸«¤Æ¤ß¤Þ¤·¤ç¤¦¡£¤³¤³¤Ï¼¡¤ÎÎã¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹ - 
<P>
<PRE>
....
nobody:x:65534:100:nobody:/dev/null:
mwilson:x:1000:100:Matthew Wilson,,,:/home/mwilson:/bin/bash
joe:*:1020:101:Joe Mode (home),,,:/home/vpn-users:/usr/sbin/pppd
bill:*:1020:101:Bill Smith (home),,,:/home/vpn-users:/usr/sbin/pppd
frank:*:1020:101:Frank Jones (home),,,:/home/vpn-users:/usr/sbin/pppd
....
</PRE>
<P>ËؤɤΥ·¥¹¥Æ¥à¤ËºÇ½é¤Î¹Ô¤Î¥æ¡¼¥¶¤¬¸«¤Ä¤«¤ë¤Ç¤·¤ç¤¦¡£
2 ÈÖÌܤΥ桼¥¶¤Ï»ä¤Ç¤¹¡£:) ¤½¤Î¼¡¤Ï²¿¿Í¤«¤ÎºîÀ®¤µ¤ì¤¿ vpn-user ¤Ç¤¹¡£
ºÇ½é¤Î¥Õ¥£¡¼¥ë¥É¤Ï¥æ¡¼¥¶Ì¾¤Ç¡¢2 ÈÖÌܤϥѥ¹¥ï¡¼¥É¤Î¥Õ¥£¡¼¥ë¥É¤Ç¤¹¡£
3 ÈÖÌܤϥ桼¥¶ ID (UID) ¤Ç 4 ÈÖÌܤϥ°¥ë¡¼¥× ID (GID) ¤Ç¤¹¡£
¤Ä¤Å¤¯ 5 ÈÖÌܤΥե£¡¼¥ë¥É¤Ï³Æ¥æ¡¼¥¶¤Î¸Ä¿Í¾ðÊó¤Ç¤¹¡£
6 ÈÖÌܤΥե£¡¼¥ë¥É¤Ï¥æ¡¼¥¶¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ç¡¢ºÇ¸å¤ÏÈà¤é¤Î¥·¥§¥ë
¤Ç¤¹¡£¤´Í÷¤Î¤È¤ª¤ê¡¢³Æ¥Õ¥£¡¼¥ë¥É¤Ï¥³¥í¥ó¤Ç¶èÀÚ¤é¤ì¤Æ¤¤¤Þ¤¹¡£ºÇ¸å¤Î
3 ¹Ô¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£¤½¤ì¤é¤Î´Ö¤Ç¤ÎÍ£°ì¤Î°ã¤¤¤Ï¡¢ºÇ½é¤Î¥Õ¥£¡¼¥ë¥É¤Î
¥æ¡¼¥¶Ì¾¤È¡¢5 ÈÖÌܤΥե£¡¼¥ë¥É¤Î¥æ¡¼¥¶¾ðÊó¤Ç¤¹¡£¤ä¤ê¤¿¤¤¤Î¤Ï¡¢
³Æ¥æ¡¼¥¶¤ËÂФ·¤Æ¤³¤Î¤è¤¦¤Ê¹Ô¤òºîÀ®¤¹¤ë¤³¤È¤Ç¤¹¡£ÀܳÁ´¤Æ¤Ëñ°ì¤Î
¥æ¡¼¥¶¤ò»È¤ï¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£¤â¤·¤½¤¦¤¹¤ë¤È¡¢Èà¤é¸Ä¡¹¤ò
¸«Ê¬¤±¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£¤½¤³¤Ç¡¢¾å¤Ë¼¨¤·¤¿¤è¤¦¤ÊÆâÍƤˤʤë¤è¤¦¡¢
¤³¤Î¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Î¹Ô¤ò¥³¥Ô¡¼¤·¤Æ¤½¤ì¤òÊÔ½¸¤·¤Æ¤¯¤À¤µ¤¤¡£2 ÈÖÌܤÎ
¥Õ¥£¡¼¥ë¥É¤Ë¥¢¥¹¥¿¥ê¥¹¥¯ (*) ¤¬¤¢¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£3 ÈÖÌܤÎ
¥Õ¥£¡¼¥ë¥É¤Ï¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤Î¾¤Î ID Á´¤Æ¤È°ã¤Ã¤Æ¤¤¤ë¤Ù¤­¤Ç¤¹¡£
»ä¤Ï 1020 ¤ò»È¤¤¤Þ¤·¤¿¡£ÉáÄÌ 1000 ̤Ëþ¤Ï¥·¥¹¥Æ¥à¤ÎÍøÍѤΤ¿¤á¤Ë
ͽÌ󤵤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤½¤ì°Ê¾å¤ò»È¤¦¤Ù¤­¤Ç¤¹¡£
4 ÈÖÌܤΥե£¡¼¥ë¥É¤Ï vpn-user ¤Î¥°¥ë¡¼¥× ID ¤Î¤Ï¤º¤Ç¤¹¡£»ä¤Ï
½ñ¤­Î±¤á¤Æ¤ª¤¯¤è¤¦¸À¤¤¤Þ¤·¤¿¡£¤½¤ì¤¬É¬ÍפʤȤ­¤¬¤ä¤Ã¤Æ¤­¤Þ¤·¤¿¡£
¤Ç¤Ï¥°¥ë¡¼¥× ID ¤ò¤½¤³¤ËÆþ¤ì¤Æ¤¯¤À¤µ¤¤¡£ºÇ¸å¤Ë¡¢¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤ò
<CODE>/home/vpn-users</CODE> ¡¢¥·¥§¥ë¤ò <CODE>/usr/sbin/pppd</CODE>
¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£¤Ç¤­¤Þ¤·¤¿¡£¤Ç¤Ï¤½¤Î¹Ô¤ò¾¤Î¥æ¡¼¥¶¤òºîÀ®¤¹¤ë¤¿¤á¤Ë
¥³¥Ô¡¼¤·¤Æ¤¯¤À¤µ¤¤¡£1 ÈÖÌÜ¤È 5 ÈÖÌܤΥե£¡¼¥ë¥É¤òÊÔ½¸¤·¤ÆÀßÄꤹ¤ë¤À¤±¤Ç¤¹¡£
<H2><A NAME="ss5.8">5.8 ¥µ¡¼¥Ð - ´ÉÍý¤¹¤ë</A>
</H2>

<P>¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¤ËÂФ·¤Æ¤³¤Î¥·¥¹¥Æ¥à¤òÍøÍѤ¹¤ë¤³¤È¤ÎÍøÅÀ¤Î°ì¤Ä¤Ï¡¢
UNIX ¥æ¡¼¥¶´ÉÍý¥³¥Þ¥ó¥É¤òÍøÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
¥¯¥é¥¤¥¢¥ó¥È¤Ï¥æ¡¼¥¶¤È¤·¤Æ¥í¥°¥¤¥ó¤·¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤¢¤Ê¤¿¤Ï¥æ¡¼¥¶¤ÎÅý·×¤ò
ÆÀ¤ë¤¿¤á¤Ëɸ½àŪ¤ÊÊýË¡¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¼¡¤Ëµó¤²¤ë¤Î¤Ï¡¢Á´¤Æ¤¬
¤É¤¦¤Ê¤Ã¤Æ¤¤¤ë¤Î¤«¸«¤ë¤¿¤á¤Ë»ä¤¬¹¥¤ó¤Ç»È¤Ã¤Æ¤¤¤ë¡¢¾¯¿ô¤Î¥³¥Þ¥ó¥É¤Ç¤¹¡£
<P>
<DL>
<P>
<DT><B>who</B><DD><P>¸½ºß¥í¥°¥¤¥ó¤·¤Æ¤¤¤ë¥æ¡¼¥¶¡¢¤½¤ì¤«¤éÈà¤é¤¬²¿»þ¡¢¤É¤³ (̾Á°¤« IP) ¤«¤é¡¢
¤É¤Î¥Ý¡¼¥È¤Ç¥í¥°¥¤¥ó¤·¤¿¤«¤òɽ¼¨¤·¤Þ¤¹¡£
<P>
<DT><B>w</B><DD><P>¤³¤Î¥³¥Þ¥ó¥É¤Ï¸½ºß¥í¥°¥¤¥ó¤·¤Æ¤¤¤ë¿Í¤Ë¤Ä¤¤¤Æ¤è¤ê¹­ÈϰϤʥꥹ¥È¤òɽ¼¨¤·¤Þ¤¹¡£
¤½¤ì¤Ï¥·¥¹¥Æ¥à¤ÎÍøÍÑ»þ´Ö¤ÈÊ¿¶ÑÉé²Ù¤âÃΤ餻¤Æ¤¯¤ì¤Þ¤¹¡£¤Þ¤¿¥æ¡¼¥¶¤Î¡¢
¥¢¥¤¥É¥ë»þ´Ö¤ò´Þ¤à¸½ºß¤Î¥×¥í¥»¥¹ (VPN ¥¯¥é¥¤¥¢¥ó¥È¤Ë¤È¤Ã¤Æ¤Ï -pppd ¤Î
¤Ï¤º¤Ç¤¹)¡¢¤½¤ì¤«¤é¸½ºß¤Î¥×¥í¥»¥¹¤ò´Þ¤àÁ´¤Æ¤Î¥×¥í¥»¥¹¤Î CPU ÍøÍÑÊýË¡¤â
ɽ¼¨¤·¤Þ¤¹¡£¤³¤ì°Ê¾å¤Î¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï <CODE>w</CODE> ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò
Æɤó¤Ç¤¯¤À¤µ¤¤¡£
<P>
<DT><B>last [username]</B><DD><P>¤³¤ì¤Ï»ØÄꤵ¤ì¤¿¥æ¡¼¥¶¡¢¤¢¤ë¤¤¤Ï¥æ¡¼¥¶Ì¾¤¬»ØÄꤵ¤ì¤Ê¤±¤ì¤ÐÁ´¤Æ¤Î
¥æ¡¼¥¶¤Î¥í¥°¥¤¥óÍúÎò¤òɽ¼¨¤·¤Þ¤¹¡£¤½¤ì¤Ï¥æ¡¼¥¶¤¬¥í¥°¥¤¥ó¤·¤Æ¤¤¤¿»þ´Ö¡¢
¤¢¤ë¤¤¤Ï¥æ¡¼¥¶¤¬¤Þ¤À¥í¥°¥¤¥ó¤·¤Æ¤¤¤ë¤³¤È¤ò¼¨¤¹¤Î¤Ç¡¢¥È¥ó¥Í¥ë¤¬¤¤¤«¤Ë
¤¦¤Þ¤¯Æ°ºî¤·¤Æ¤¤¤ë¤«³Î¤«¤á¤ë¤Ë¤ÏºÇ¤âÊØÍø¤ÊÊýË¡¤Ç¤¹¡£¥·¥¹¥Æ¥à¤¬Ä¹¤¤
»þ´Ö µ¯Æ°¤·¤Ä¤Å¤±¤Æ¤¤¤ë¤È¡¢¤³¤Î¥ê¥¹¥È¤ÏÈó¾ï¤ËŤ¯¤Ê¤êÆÀ¤ë¤È¤¤¤¦
¤³¤È¤ò·Ù¹ð¤·¤Æ¤ª¤­¤Þ¤¹¡£¥Ñ¥¤¥×¤Ï <CODE>grep</CODE> ¤¢¤ë¤¤¤Ï <CODE>head</CODE>
¤òÄ̤äơ¢ÃΤꤿ¤¤¤³¤È¤ò³Î¼Â¤Ë¸«¤Ä¤±¤Þ¤¹¡£
</DL>
<P><CODE>/home/vpn-users/.ssh/authorized_keys</CODE> ¥Õ¥¡¥¤¥ë¤òÊѹ¹¤·¤Æ¡¢
Àܳ¤òµö²Ä¤¹¤ë¥æ¡¼¥¶¤òÀ©¸æ¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¤â¤·
¤½¤Î¥æ¡¼¥¶¤Î¸ø³«¥­¡¼¤Î¹Ô¤ò¤³¤Î¥Õ¥¡¥¤¥ë¤«¤éºï½ü¤¹¤ë¤È¡¢Èà¤é¤Ï¥í¥°¥¤¥ó¤¹¤ë
¤³¤È¤¬¤Ç¤­¤Ê¤¯¤Ê¤ë¤Ç¤·¤ç¤¦¡£
<H2><A NAME="ss5.9">5.9 ¥¯¥é¥¤¥¢¥ó¥È - ¥«¡¼¥Í¥ë¤ò¹½ÃÛ¤¹¤ë</A>
</H2>

<P>¥¯¥é¥¤¥¢¥ó¥È¤Ë°Ü¤ê¤Þ¤·¤ç¤¦¡£ºÇ½é¤Ë¡¢É¬ÍפȤ¹¤ëµ¡Ç½Á´¤Æ¤ò¥µ¥Ý¡¼¥È¤Ç¤­¤ë¤è¤¦¤Ë¡¢
¥«¡¼¥Í¥ë¤òºÆ¹½ÃÛ¤·¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£ºÇÄã¸Âµá¤á¤é¤ì¤ë¤Î¤Ï¡¢¥«¡¼¥Í¥ëÆâ¤Ë ppp ¤ò
ÁȤ߹þ¤à¤³¤È¤Ç¤¹¡£¤½¤Î¸å¡¢Â¾¤Î¥Þ¥·¥ó¤ËÂФ·¤Æ¥È¥ó¥Í¥ë¤Ø¤Î¥¢¥¯¥»¥¹¤ò
µö²Ä¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¸Â¤ë¤È¡¢¥Õ¥©¥ï¡¼¥Ç¥£¥ó¥°¡¢¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¡¢¥²¡¼¥È¥¦¥§¥¤µ¡Ç½¤¬
ɬÍפȤʤë¤Ç¤·¤ç¤¦¡£¤³¤ÎÎã¤Ç¤Ï¡¢Îã¤È¤·¤Æ¼¨¤·¤¿¥ì¥¤¥¢¥¦¥È¤ÎÃæ¤Î¡¢Î¥¤ì¤¿¤È¤³¤í¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¤Î
¥Þ¥·¥ó¤Î¤¦¤Á¤Î°ìÂæ¤òÀßÄꤹ¤ë¤³¤È¤Ë¤·¤Þ¤¹¡£
¼¡¤Ëµó¤²¤ë¥ª¥×¥·¥ç¥ó¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£·«¤êÊÖ¤·¤Ë¤Ê¤ê¤Þ¤¹¤¬¡¢
¤â¤·¤¢¤Ê¤¿¤¬°ÊÁ°¤Ë¥«¡¼¥Í¥ë¤ò¹½ÃÛ¤·¤¿¤³¤È¤¬¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¢
<A HREF="http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</A>¤òÆɤó¤Ç¤¯¤À¤µ¤¤¡£
[ÌõÃí¡§ÆüËܸìÌõ¤Ï 
<A HREF="http://www.linux.or.jp/JF/JFdocs/Kernel-HOWTO.html">http://www.linux.or.jp/JF/JFdocs/Kernel-HOWTO.html</A> ¤Ë¤¢¤ê¤Þ¤¹¡£]
<P>2.0 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<UL>
<LI>CONFIG_PPP</LI>
<LI>CONFIG_FIREWALL</LI>
<LI>CONFIG_IP_FORWARD</LI>
<LI>CONFIG_IP_FIREWALL</LI>
<LI>CONFIG_IP_ROUTER</LI>
<LI>CONFIG_IP_MASQUERADE</LI>
<LI>CONFIG_IP_MASQUERADE_ICMP</LI>
</UL>
<P>2.2 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<UL>
<LI>CONFIG_PPP</LI>
<LI>CONFIG_FIREWALL</LI>
<LI>CONFIG_IP_ADVANCED_ROUTER</LI>
<LI>CONFIG_IP_FIREWALL</LI>
<LI>CONFIG_IP_ROUTER</LI>
<LI>CONFIG_IP_MASQUERADE</LI>
<LI>CONFIG_IP_MASQUERADE_ICMP</LI>
</UL>
<H2><A NAME="ss5.10">5.10 ¥¯¥é¥¤¥¢¥ó¥È - ¥Í¥Ã¥È¥ï¡¼¥¯¤òÀßÄꤹ¤ë</A>
</H2>

<P>¤µ¤Æ¡¢¥¯¥é¥¤¥¢¥ó¥È¥Ü¥Ã¥¯¥¹¤òÀßÄꤷ¤Þ¤·¤ç¤¦¡£³°Éô¥Í¥Ã¥È¥ï¡¼¥¯¤Î
ÀßÄ꤬ºÑ¤ó¤Ç¡¢¤½¤ì¤¬Æ°ºî¤·¤Æ¤¤¤ë¤ÈÁÛÁü¤·¤Þ¤·¤ç¤¦¡£º£Å٤ϡ¢
¥¤¥ó¥È¥é¥Í¥Ã¥È¤ò¥µ¡¼¥Ó¥¹¤¹¤ë¤¿¤á¤Ë¥¯¥é¥¤¥¢¥ó¥È¤ÎÆâÉô¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ò
ÀßÄꤹ¤ë¤³¤È¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡£
<H3>¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹</H3>

<P>¤Þ¤ººÇ½é¤ËÆâÉô¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤³¤ì¤ò¤ä¤ë¤Ë¤Ï¼¡¤ò <CODE>/etc/rc.d/rc.inet1</CODE> (¤¢¤ë¤¤¤Ï¤½¤ì¤Ë
ÁêÅö¤¹¤ë) ¥Õ¥¡¥¤¥ë¤ËÄɲ䷤Ƥ¯¤À¤µ¤¤ -
<P>2.0 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<P>
<PRE>
/sbin/ifconfig eth1 192.168.10.253 broadcast 192.168.10.255 netmask 255.255.255.0
/sbin/route add -net 192.168.10.0 netmask 255.255.255.0 dev eth1
</PRE>
<P>2.2 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<P>
<PRE>
/sbin/ifconfig eth1 192.168.10.253 broadcast 192.168.10.255 netmask 255.255.255.0
</PRE>
<H3>¥Õ¥£¥ë¥¿µ¬Â§</H3>

<P>Î¥¤ì¤¿½ê¤Ë¤¢¤ë¥ª¥Õ¥£¥¹¤òÀßÄꤹ¤ë¤¿¤á¤Ë¡¢¥È¥ó¥Í¥ë¤òÄ̤·¤Æ
ÁÐÊý¸þ¤Ë¥È¥é¥Õ¥£¥Ã¥¯¤¬¹Ô¤­Í褹¤ë¤³¤È¤òµö¤¹¤è¤¦¤Ê¥Õ¥£¥ë¥¿µ¬Â§¤òÀßÄê
¤·¤¿Êý¤¬¤è¤¤¤Ç¤·¤ç¤¦¡£
¼¡¤Ëµó¤²¤ë¹Ô¤ò <CODE>/etc/rc.d/rc.inet1</CODE> 
(¤Þ¤¿¤Ï¤½¤ì¤ËÁêÅö¤¹¤ë) ¥Õ¥¡¥¤¥ë¤ËÄɲ䷤Ƥ¯¤À¤µ¤¤ -
<P>2.0 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<P>
<PRE>
/sbin/ipfwadm -F -f
/sbin/ipfwadm -F -p deny
/sbin/ipfwadm -F -a accept -b -S 192.168.10.0/24 -D 192.168.0.0/16
</PRE>
<P>2.2 ¥«¡¼¥Í¥ë¤ËÂФ·¤Æ - 
<P>
<PRE>
/sbin/ipchains -F forward
/sbin/ipchains -P forward DENY
/sbin/ipchains -A forward -j ACCEPT -b -s 192.168.10.0/24 -d 192.168.0.0/16
</PRE>
<P>¤¢¤Ê¤¿¤Ï¡¢¤³¤ì¤é¤Î¹Ô¤¬¥µ¡¼¥Ð¤Ë¤¢¤ë¤â¤Î¤È»÷¤Æ¤¤¤ë¤³¤È¤Ë
µ¤¤Å¤¤¤¿¤«¤â¤·¤ì¤Þ¤»¤ó¡£¤Ê¤¼¤«¤È¤¤¤¦¤È¤½¤ì¤ÏƱ¤¸¤â¤Î¤À¤«¤é¤Ç¤¹¡£
¤³¤Îµ¬Â§¤Ï¤Þ¤µ¤Ë¡¢¤³¤ì¤é¤Î 2 ¤Ä¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Î´Ö¤Ç¥È¥é¥Õ¥£¥Ã¥¯¤¬
¸þ¤«¤¦¤³¤È¤¬¤Ç¤­¤ë¾ì½ê¤ò½Ò¤Ù¤Æ¤¤¤Þ¤¹¡£
<H3>·ÐÏ©¤òÀßÄꤹ¤ë</H3>

<P>Í£°ìɬÍפÊÆÃÊ̤ηÐÏ©¤Ï¥È¥ó¥Í¥ë¤ò¹½ÃÛ¤¹¤ë¥¹¥¯¥ê¥×¥È¤Ë¤è¤Ã¤Æ
ºî¤é¤ì¤Þ¤¹¡£
<H2><A NAME="ss5.11">5.11 ¥¯¥é¥¤¥¢¥ó¥È - <CODE>pppd</CODE>¤òÀßÄꤹ¤ë</A>
</H2>

<P>¥¯¥é¥¤¥¢¥ó¥È¤Î <CODE>/etc/ppp/options</CODE> ¥Õ¥¡¥¤¥ë¤òÊÔ½¸¤¹¤ëɬÍפÏ
Á´¤¯¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£"auth" ¥ª¥×¥·¥ç¥ó¡¢¤¢¤ë¤¤¤Ï¾¤ÎÆø¢¥ª¥×¥·¥ç¥ó
¤¬Í¿¤¨¤é¤ì¤¿¾ì¹ç¤Ï¤½¤ÎɬÍפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡£¤ä¤Ã¤Æ¤ß¤ÆÂÌÌܤÀ¤Ã¤¿¤é¡¢ÉÔÀµ¤Ê
<CODE>/etc/ppp/options</CODE> ¤¬Æ°ºî¤¹¤ë¤Ç¤·¤ç¤¦¡£
¤É¤ì(¤â¤·¤½¤ì¤¬ÌÀÇò¤Ç¤Ê¤±¤ì¤Ð)¤¬¤ª¤«¤·¤¯¤·¤¿¤Î¤«¤ò¸«¤Ä¤±¤ë¤¿¤á¤Ë¡¢
¸Å¤¤¥Õ¥¡¥¤¥ë¤«¤é¥ª¥×¥·¥ç¥ó¤òÄɲ䷤ĤŤ±¡¢¤½¤ì¤ò²óÈò¤Ç¤­¤ë¤«¤É¤¦¤«¸«¶Ë¤á¤Æ¤¯¤À¤µ¤¤¡£
¤½¤ì¤é¤ÏÁ´¤¯É¬Íפʤ¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
¤¢¤Ê¤¿¤¬ <CODE>pppd</CODE> ¤ò¾¤Î¤³¤È¤Ë»È¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢Â¿Ê¬É¬Íפʤ¤¤Ç¤·¤ç¤¦¡£
<P>
<H2><A NAME="ss5.12">5.12 ¥¯¥é¥¤¥¢¥ó¥È - <CODE>ssh</CODE> ¤òÀßÄꤹ¤ë</A>
</H2>

<P>¥¯¥é¥¤¥¢¥ó¥È¤Î root ¤Ç¼¡¤Î¹Ô¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤ - 
<P>
<PRE>
# mkdir /root/.ssh
# ssh-keygen -f /root/.ssh/identity.vpn -P ""
</PRE>
<P>¤³¤ì¤Ï <CODE>.ssh</CODE> ¥Ç¥£¥ì¥¯¥È¥ê¤Ë <CODE>identity.vpn</CODE> ¤È 
<CODE>identity.vpn.pub</CODE> ¤Î 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤Ç¤·¤ç¤¦¡£
ºÇ½é¤Ï¤¢¤Ê¤¿¤Î¥×¥é¥¤¥Ù¡¼¥È¥­¡¼¤Ç¡¢¤½¤Î¤Þ¤Þ¤Ë¤·¤Æ¤ª¤¯¤Ù¤­¤Ç¤¹¡£
°Å¹æ²½¤µ¤ì¤¿¥»¥Ã¥·¥ç¥ó¤òÄ̤¹¤Î¤Ç¤Ê¤¤¸Â¤ê¡¢<EM>¥Í¥Ã¥È¾å¤Ç¤³¤ì¤òÀäÂФËÁ÷¿®¤·¤Ê¤¤¤Ç
¤¯¤À¤µ¤¤</EM>¡£2 ÈÖÌܤΥե¡¥¤¥ë¤Ï¤¢¤Ê¤¿¤Î¸ø³«¥­¡¼¤Ç¡¢¤¢¤Ê¤¿¤¬Â¾¤Î¥·¥¹¥Æ¥à¤Ë¥¢¥¯¥»¥¹
¤¹¤ë¤³¤È¤òµö²Ä¤¹¤ë¤À¤±¤Ç¡¢¤¢¤Ê¤¿¤Î¥·¥¹¥Æ¥à¤ËÆþ¤ë¤¿¤á¤Ë»È¤¦¤³¤È¤Ï¤Ç¤­¤Ê¤¤¤Î¤Ç¡¢
¤³¤ì¤Ï²¿½è¤Ç¤â¹¥¤­¤Ê¤È¤³¤í¤ØÁ÷¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
¤½¤ì¤Ï¼ÂºÝ¤Î¥­¡¼¤ò 1 ¹Ô´Þ¤à¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤Ç¤¹¡£¹Ô¤ÎºÇ¸å¤Ï¡¢¥­¡¼¤ò²õ¤¹¤³¤È¤ò
Éݤ¬¤é¤º¤ËÊѹ¹¤Ç¤­¤ë¥³¥á¥ó¥È¥Õ¥£¡¼¥ë¥É¤Ç¤¹¡£
Î㤨¤Ð¥­¡¼¤Ï¼¡¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤¹ -
<P>
<PRE>
1024 35 1430723736674162619588314275167.......250872101150654839 root@vpn-client.mycompany.com
</PRE>
<P>¼ÂºÝ¤Ë¤Ï¤½¤ì¤è¤ê¤«¤Ê¤êŤ¤¤Ç¤¹¤¬¡¢Á´Éô¤ò¸«¤»¤¿¤È¤·¤Æ¤â¥Ú¡¼¥¸¤Ë¤Ï
¤½¤°¤ï¤Ê¤¤¤Ç¤·¤ç¤¦¡£¥µ¡¼¥Ð¤Î <CODE>/home/vpn-users/.ssh/authorized_keys</CODE>
¥Õ¥¡¥¤¥ë¤Ë¥­¡¼¤ò¥³¥Ô¡¼¤·¤Æ¤¯¤À¤µ¤¤¡£1 ¹Ô¤¢¤¿¤ê 1 ¤Ä¤Î¥­¡¼¤¬¤¢¤ê¡¢
³Æ¥­¡¼¤¬Ê£¿ô¹Ô¤Ë¤Þ¤¿¤¬¤Ã¤Æ²õ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£
¤É¤Î¹Ô¤¬¤É¤Î¥æ¡¼¥¶¤ËÂбþ¤¹¤ë¤Î¤«»×¤¤½Ð¤¹½õ¤±¤Ë¤Ê¤ë¤è¤¦¡¢¥³¥á¥ó¥È¥Õ¥£¡¼¥ë¥É
Á´¤Æ¤ò¹¥¤­¤Ê¤è¤¦¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£»ä¤Ï¤½¤¦¤¹¤ë¤³¤È¤ò¶¯¤¯´«¤á¤Þ¤¹¡£
<H2><A NAME="ss5.13">5.13 ¥¯¥é¥¤¥¢¥ó¥È - Àܳ¤ò³ÎΩ¤¹¤ë</A>
</H2>

<P>¤Ç¤Ï VPN ¥µ¡¼¥Ð¤Ë¼ÂºÝ¤ËÀܳ¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£¤Þ¤º¡¢Ã±°ì¤ÎÀܳ¤ò¹Ô¤¤¡¢
<CODE>ssh</CODE> ¤Îknown_hosts ¥Õ¥¡¥¤¥ë¤ÎÀßÄê¤ò¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
¤³¤ì¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤ - 
<P>
<PRE>
# ssh vpn.mycompany.com
</PRE>
<P>Àܳ¤ò³¤±¤¿¤¤¤«¤É¤¦¤«¼ÁÌ䤵¤ì¤¿¤È¤­¤Ë ''yes'' ¤ÈÅú¤¨¤Æ¤¯¤À¤µ¤¤¡£
¥µ¡¼¥Ð¤Ï ''permission denied'' ¤È¸À¤¦¤«¤âÃΤì¤Þ¤»¤ó¤¬¡¢Âç¾æÉפǤ¹¡£
¥µ¡¼¥Ð¤ËÂФ·¤Æ¡¢Àܳ¥¹¥¯¥ê¥×¥È¤ÎÃæ¤Ç»È¤Ã¤Æ¤¤¤ë¤Î¤ÈƱ¤¸Ì¾Á°¤ò
»È¤¦¤È¤¤¤¦¤³¤È¤Ï½ÅÍפǤ¹¡£¤Ç¤Ï¡¢¼¡¤Î¹Ô¤ò¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£
¤­¤Ã¤È¡¢ÀßÄê¤òŬ¹ç¤µ¤»¤ë¤¿¤á¤Ë¥ª¥×¥·¥ç¥ó¤ÎËؤɤòÊѹ¹¤¹¤ëɬÍפ¬
¤¢¤ë¤Ç¤·¤ç¤¦¡£
<P>
<PRE>
# /usr/sbin/pty-redir /usr/bin/ssh -t -e none -o 'Batchmode yes' -c blowfish -i /root/.ssh/identity.vpn -l vpn-user vpn.mycompany.com > /tmp/vpn-device

(10 ÉäۤÉÂÔ¤Á¤Þ¤·¤ç¤¦)

# /usr/sbin/pppd `cat /tmp/vpn-device` 192.168.10.254:192.168.40.254
</PRE>
<P>pppd ¤Î¹Ô¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ë IP ¥¢¥É¥ì¥¹¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ºÇ½é¤Ï¥È¥ó¥Í¥ë¤Î
¥¯¥é¥¤¥¢¥ó¥È¦¤Îü¤Î¥¢¥É¥ì¥¹¤Ç¤¹¡£2 ÈÖÌܤϥȥó¥Í¥ë¤Î¥µ¡¼¥Ð¦¤Îü¤Î¥¢¥É¥ì¥¹¤Ç
¤½¤ì¤Ï¥µ¡¼¥Ð¤ÎÆâÉô¥¢¥É¥ì¥¹¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤â¤·¤½¤ì¤é¤ÎÁ´¤Æ¤¬Æ°ºî
¤·¤Æ¤¤¤ë¤è¤¦¤Ê¤é¡¢Â³¤±¤Æ¤¯¤À¤µ¤¤¡£¤â¤·¤½¤¦¤Ç¤Ê¤¤¤Ê¤é¡¢»ØÄꤷ¤¿
¥ª¥×¥·¥ç¥óÁ´¤Æ¤ËÂФ·¤Æ¡¢¤½¤ì¤é¤¬Àµ¤·¤¯¤Ä¤Å¤é¤ì¤Æ¤¤¤ë¤«¥Á¥§¥Ã¥¯¤·¤Æ
¤¯¤À¤µ¤¤¡£¤â¤·¤Þ¤À²¿¤«¤¬¤¦¤Þ¤¯¤¤¤«¤Ê¤¤¤Ê¤é¡¢
<A HREF="VPN-HOWTO-6.html#pitfalls">Íî¤È¤··ê ¥»¥¯¥·¥ç¥ó</A>¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
<H2><A NAME="ss5.14">5.14 ¥¯¥é¥¤¥¢¥ó¥È - ·ÐÏ©¤òÀßÄꤹ¤ë</A>
</H2>

<P>¤Ç¤Ï¡¢·ÐÏ©¤ò¡¢¥È¥ó¥Í¥ë¤òÄ̤·¤Æ¥È¥é¥Õ¥£¥Ã¥¯¤òÁ÷¤ë¤è¤¦¤ËÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
¤³¤ì¤ò¼Â¹Ô¤¹¤ë¤À¤±¤Ç¤¹ -
<P>
<PRE>
# /sbin/route add -net 192.168.0.0 gw vpn-internal.mycompany.com netmask 255.255.0.0
</PRE>
<P>¤³¤ì¤Ç¥È¥ó¥Í¥ë¤Î¾ü¤Ë¤¢¤ë¥Þ¥·¥ó¤ÈÄÌ¿®¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£
¤ä¤Ã¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£¤¹¤ó¤Ê¤ê¤¤¤Ã¤¿¡© ¤â¤·¤¦¤Þ¤¯Æ°¤«¤Ê¤¤¤Ê¤é¡¢
¤É¤³¤ËÌäÂ꤬¤¢¤ë¤Î¤«¤òÆͤ­»ß¤á¤ë¤¿¤á¤Ë<CODE>ping</CODE> ¤ä <CODE>traceroute</CODE>
¤ò»È¤Ã¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£¤â¤·¼Â¤ÏÆ°¤¤¤Æ¤¤¤ë¤Ê¤é¡¢¥¹¥¯¥ê¥×¥È¤¬¤¢¤Ê¤¿¤Î¤¿¤á¤Ë
¤½¤Î»Å»ö¤ò¤·¤Æ¤¯¤ì¤ë¤è¤¦ÀßÄê¤ò³¤±¤Æ¤¯¤À¤µ¤¤¡£
<H2><A NAME="ss5.15">5.15 ¥¯¥é¥¤¥¢¥ó¥È - ¥¹¥¯¥ê¥×¥È¤ò½ñ¤¯</A>
</H2>

<P>»ä¤¬ 
<A HREF="VPN-HOWTO-4.html#vpnd-script">¤³¤³</A> ¤Ç¼¨¤·¤¿ vpnd ¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£
¤¿¤À¡¢¾¯¤·Êѹ¹¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¼¡¤ÎÊѹ¹¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤ -
<P>
<UL>
<LI>´Ä¶­¤Ë¹ç¤¦¤è¤¦ÀèƬ¤ÎÊÑ¿ô¤òÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£ËؤɤϤ½¤Î¤Þ¤Þ¤Ç
Âç¾æÉפǤ¹¤¬¡¢É¬ÍפʤéÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£</LI>
<LI>27 ¹ÔÌÜ - ¥í¡¼¥«¥ë¡¢¤½¤ì¤«¤é¥ê¥â¡¼¥È¤Î IP ¥¢¥É¥ì¥¹¤ò $PPP_OPTIONS ¤Î
Á°¤Ë²Ã¤¨¤Æ¤¯¤À¤µ¤¤¡£</LI>
<LI>31 ¹ÔÌÜ - ¤³¤Î¹Ô¤È¸å¤Î 2 ¹Ô¤ò¡¢ÆâÉô¥Í¥Ã¥È¤Î·ÐÏ©¤òÀßÄꤹ¤ë¤è¤¦¤Ë
Êѹ¹¤·¤Æ¤¯¤À¤µ¤¤¡£</LI>
</UL>
<H3>¼Â¹Ô¤µ¤»Â³¤±¤ë</H3>

<P>bash ¥¹¥¯¥ê¥×¥È¤ÏÉáÄÌ°ÂÄꤷ¤Æ¤¤¤Þ¤¹¤¬¡¢¼ºÇÔ¤¹¤ë¤³¤È¤¬ÃΤé¤ì¤Æ¤¤¤Þ¤¹¡£
<CODE>vpnd</CODE> ¥¹¥¯¥ê¥×¥È¤¬Æ°ºî¤ò³¤±¤Æ¤¤¤ë¤³¤È¤ò³Î¤«¤á¤ë¤¿¤á¤Ë¤Ï¡¢
¥¯¥é¥¤¥¢¥ó¥È¤Î crontab ¤Ë <CODE>check-vpnd</CODE> ¥¹¥¯¥ê¥×¥È¤òµ¯Æ°¤¹¤ë
¥¨¥ó¥È¥ê¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£»ä¤Ï 5 ʬ¤«¤½¤³¤¤¤éËè¤Ë»ä¤Î¤â¤Î¤òµ¯Æ°
¤·¤Æ¤¤¤Þ¤¹¡£¤â¤· <CODE>vpnd</CODE> ¤¬ËÜÅö¤Ë¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¤È¤·¤Æ¤â¡¢
<CODE>check-vpnd</CODE> ¤Ï¤½¤ìÄø¿¤¯¤Î CPU ¤ò»ÈÍѤ·¤Þ¤»¤ó¡£
<HR>
<A HREF="VPN-HOWTO-6.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO-4.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="VPN-HOWTO.html#toc5">Ìܼ¡¤Ø</A>
</BODY>
</HTML>