This file is indexed.

/usr/share/doc/HOWTO/ja-html/NET3-4-HOWTO-6.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
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>Linux Networking-HOWTO (Previously the Net-3 Howto): IP ´Ø·¸¡¢¥¤¡¼¥µ¥Í¥Ã¥È´Ø·¸¤Î¾ðÊó</TITLE>
 <LINK HREF="NET3-4-HOWTO-7.html" REL=next>
 <LINK HREF="NET3-4-HOWTO-5.html" REL=previous>
 <LINK HREF="NET3-4-HOWTO.html#toc6" REL=contents>
</HEAD>
<BODY>
<A HREF="NET3-4-HOWTO-7.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="NET3-4-HOWTO-5.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="NET3-4-HOWTO.html#toc6">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s6">6. IP ´Ø·¸¡¢¥¤¡¼¥µ¥Í¥Ã¥È´Ø·¸¤Î¾ðÊó</A></H2>

<P>¤³¤Î¾Ï¤Ç¤Ï¡¢¥¤¡¼¥µ¥Í¥Ã¥È¤È IP ¤Ë¸ÇÍ­¤Î¾ðÊó¤òÀâÌÀ¤·¤Þ¤¹¡£¤³¤Î¾Ï¤Ë´Þ
¤Þ¤ì¤ëÆâÍƤϡ¢°ÊÁ°¤ÎÈǤǡ֤½¤ì¤¾¤ì¤Î¥Í¥Ã¥È¥ï¡¼¥¯µ»½Ñ¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¡×
¤È¤¤¤¦¾Ï¤Ë´Þ¤Þ¤ì¤Æ¤¤¤¿ÆâÍƤ«¤é¡¢É®¼Ô¤¬ÆäËÌÌÇò¤¤¤È»×¤Ã¤¿¤â¤Î¤ò
¥Ô¥Ã¥¯¥¢¥Ã¥×¤·¤ÆÊ̸ĤˤޤȤ᤿¤â¤Î¤Ç¤¹¡£
LAN ¤ò°ú¤¤¤Æ¤¤¤ë¿Í¤Ê¤éï¤Ç¤â¡¢¤³¤Î¾Ï¤ÎÆâÍƤÏÌò¤ËΩ¤Ä¤Ï¤º¤Ç¤¹¡£
<P>
<H2><A NAME="ss6.1">6.1 ¥¤¡¼¥µ¥Í¥Ã¥È</A>
</H2>

<P>¥¤¡¼¥µ¥Í¥Ã¥È¤Î¥Ç¥Ð¥¤¥¹Ì¾¤Ï `<CODE>eth0</CODE>', `<CODE>eth1</CODE>',
`<CODE>eth2</CODE>'¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£¥«¡¼¥Í¥ë¤¬¸¡½Ð¤·¤¿ºÇ½é¤Î¥«¡¼¥É¤¬ 
`<CODE>eth0</CODE>'¤Ç¡¢°Ê²¼¥«¡¼¥É¤¬¸¡½Ð¤¹¤ë½ç¤ËÈֹ椬¿¶¤é¤ì¤Æ¤¤¤­¤Þ¤¹¡£
<P>¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï Linux ¥«¡¼¥Í¥ë¤Ï¥¤¡¼¥µ¥Í¥Ã¥È¥Ç¥Ð¥¤¥¹¤ò°ì¤Ä¤·¤«¸¡½Ð¤·¤Ê
¤¤¤Î¤Ç¡¢¤½¤ì°Ê¾å¤Î¥Ü¡¼¥É¤ò¥«¡¼¥Í¥ë¤Ë¸¡½Ð¤µ¤»¤ë¤¿¤á¤Ë¤Ï¡¢¥³¥Þ¥ó¥É¥é¥¤¥ó
°ú¿ô¤Ç»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
<P>Linux ¤Ç¥¤¡¼¥µ¥Í¥Ã¥È¥«¡¼¥É¤ò»È¤¦ÊýË¡¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï
<A HREF="Ethernet-HOWTO.html">Ethernet-HOWTO</A>
¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>¤ª»È¤¤¤Î¥¤¡¼¥µ¥Í¥Ã¥È¥«¡¼¥É¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤è¤¦¤Ë¥«¡¼¥Í¥ë¤ò¤­¤Á¤ó¤ÈºÆ¹½ÃÛ
¤·¤Æ¤·¤Þ¤¨¤ÐÀßÄꤽ¤Î¤â¤Î¤Ï´Êñ¤Ç¤¹¡£
<P>ÀßÄê¤ÏÄ̾°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹(¤Û¤È¤ó¤É¤Î¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Ï¡¢
¥¤¡¼¥µ¥Í¥Ã¥È¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤è¤¦¤ËÀßÄꤹ¤ì¤Ð¼«Æ°Åª¤Ë¤³¤ÎÀßÄê¤â¹Ô¤¦
¤Ï¤º¤Ç¤¹):
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
        root# route add -net 192.168.0.0 netmask 255.255.255.0 eth0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¤Û¤È¤ó¤É¤Î¥¤¡¼¥µ¥Í¥Ã¥È¥Ç¥Ð¥¤¥¹¤Ï Donald Becker
<CODE>becker@CESDIS.gsfc.nasa.gov</CODE> ¤¬³«È¯¤·¤Þ¤·¤¿¡£
<P>
<H2><A NAME="ss6.2">6.2 EQL - Ê£¿ô²óÀþ¤Î¥È¥é¥Õ¥£¥Ã¥¯¥¤¥³¥é¥¤¥¶</A>
</H2>

<P>EQL ¤Î¥Ç¥Ð¥¤¥¹Ì¾¤Ï `<CODE>eql</CODE>' ¤Ç¤¹¡£É¸½à¤Î¥«¡¼¥Í¥ë¥½¡¼¥¹¤Ç¤Ï°ìÂæ¤Î
¥Þ¥·¥ó¤Ç°ì¤Ä¤Î EQL ¥Ç¥Ð¥¤¥¹¤·¤«»È¤¨¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£EQL ¤ò»È¤¨¤Ð¡¢
PPP ¤ä slip¡¢plip ¤È¤¤¤Ã¤¿ÆóÅÀ´ÖÀܳ¤òÊ£¿ôÍÑ°Õ¤·¤Æ¡¢¤½¤ì¤é¤ò°ì¤Ä¤ÎÏÀÍý
Ū¤ÊÀܳ¤Î¤è¤¦¤ËÍøÍѤǤ­¤Þ¤¹¡£¤¿¤¤¤Æ¤¤¤Î¾ì¹ç¡¢¹â®¤ÎÀìÍÑÀþ¤è¤ê¤âÄ㮲ó
Àþ¤òÊ£¿ô¤Þ¤È¤á¤¿Êý¤¬°Â²Á¤Ë²óÀþ®ÅÙ¤ò²Ô¤²¤Þ¤¹¡£
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
        Network device support  --->
            [*] Network device support
            &lt;*> EQL (serial line load balancing) support
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¤³¤Îµ¡Ç½¤ò»È¤¦¤¿¤á¤Ë¤Ï¡¢ÀܳÀè¤Î¥Þ¥·¥ó¤â EQL µ¡Ç½¤ò»ý¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤¤
¤±¤Þ¤»¤ó¡£Linux¡¢ Livingstone Portmaster ¥·¥ê¡¼¥º°Ê¹ß¤Î¥À¥¤¥¢¥ë¥¤¥ó
¥µ¡¼¥Ð¤Ê¤É¤¬¤³¤Îµ¡Ç½¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
<P>EQL ¤òÀßÄꤹ¤ë¤Ë¤Ï¡¢
<A HREF="ftp://metalab.unc.edu/pub/linux/system/Serial/eql-1.2.tar.gz">metalab.unc.edu</A>
¤«¤éÆþ¼ê¤Ç¤­¤ë EQL Íѥġ¼¥ë¤¬É¬Íפˤʤê¤Þ¤¹¡£
<P>EQL ¤ÎÀßÄê¤Ï¤´¤¯´Êñ¤Ç¤¹¡£¤Þ¤ººÇ½é¤Ë eql ¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤òÀßÄꤷ¤Þ¤¹¡£
eql ¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ï¾¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¤È¤Û¤È¤ó¤ÉƱ¤¸¤Ç¤¹¡£
IP ¥¢¥É¥ì¥¹¤ä mtu ¤Ï 
<EM>ifconfig</EM> ¤òÍѤ¤¤Æ²¼µ­¤Î¤è¤¦¤ËÀßÄꤷ¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# ifconfig eql 192.168.10.1 mtu 1006
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¼¡¤Ë¡¢»È¤ª¤¦¤È¤·¤Æ¤¤¤ë²óÀþ¤½¤ì¤¾¤ì¤ò¼êÆ°¤Çµ¯Æ°¤·¤Þ¤¹¡£ÆóÅÀ´ÖÀÜ
³¤òÊ£¿ôÍÑ°Õ¤¹¤ë¤³¤È¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡£¤É¤Î¤è¤¦¤Ëµ¯Æ°¤¹¤ë¤«¤Ï»È¤¦Àܳ¤Î¼ï
Îà¤Ë°Í¸¤·¤Þ¤¹¤Î¤Ç¡¢¾Ü¤·¤¤¾ðÊó¤Ï¤½¤ì¤¾¤ì¤ÎÀܳ·ÁÂ֤ˤĤ¤¤ÆÀâÌÀ¤·¤¿¾Ï¤ò
¤´Í÷¤¯¤À¤µ¤¤¡£
<P>ºÇ¸å¤Ë¥·¥ê¥¢¥ëÀܳ¤ò EQL ¥Ç¥Ð¥¤¥¹¤Ë·ë¤Ó¤Ä¤±¤Þ¤¹¡£¤³¤ì¤Ï¡Ö¥¹¥ì¡¼¥Ö²½
(enslalving)¡×¤È¸Æ¤Ð¤ì¡¢<EM>eql_enslave</EM> ¥³¥Þ¥ó¥É¤Ë¤è¤Ã¤Æ
°Ê²¼¤Î¤è¤¦¤Ë¹Ô¤¤¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# eql_enslave eql sl0 28800
        root# eql_enslave eql ppp0 14400
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P><EM>eql_enslave</EM> ¥³¥Þ¥ó¥É¤ËÍ¿¤¨¤ë¡Ö¿äÄê²óÀþ®ÅÙ(estimated speed)¡×
¥Ñ¥é¥á¡¼¥¿¤Ï¡¢Ä¾Àܤˤϲ¿¤â¤·¤Þ¤»¤ó¡£¤³¤Î¥Ñ¥é¥á¡¼¥¿¤Ï EQL ¥Ç¥Ð¥¤¥¹
¤¬¥Ç¡¼¥¿¥°¥é¥à¤ò¤½¤ì¤¾¤ì¤Î²óÀþ¤«¤é¤É¤Î¤è¤¦¤Ê³ä¹ç¤Ç¼õ¤±¤ë¤«¤ò·èÄꤹ¤ë¤¿
¤á¤Ë»È¤ï¤ì¤ë¤Î¤Ç¡¢¤³¤Î¿ô»ú¤ò¤¦¤Þ¤¯Ä´À°¤·¤ÆºÇŬÃͤòõ¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>EQL ¥Ç¥Ð¥¤¥¹¤«¤é²óÀþ¤ò³«Êü¤¹¤ë¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ë 
<EM>eql_emancipate</EM> ¥³¥Þ¥ó¥É¤ò»È¤¤¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# eql_emancipate eql sl0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¾¤ÎÆóÅÀ´ÖÀܳ¤ÈƱ¤¸¤¯¡¢EQL ¥Ç¥Ð¥¤¥¹¤ò»È¤Ã¤¿·ÐÏ©À©¸æ¤â²Äǽ¤Ç¤¹¤¬¡¢
¤½¤Î¾ì¹ç¼ÂºÝ¤Î¥·¥ê¥¢¥ë¥Ç¥Ð¥¤¥¹¤Ç¤Ï¤Ê¤¯ <CODE>eql</CODE> ¥Ç¥Ð¥¤¥¹¤ò·ÐÏ©¤Ë
»È¤¤¤Þ¤¹¡£Î㤨¤Ð¡¢°Ê²¼¤Î¤è¤¦¤Ë·ÐÏ©¤òÀßÄê¤Ç¤­¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# route add default eql
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>EQL ¥É¥é¥¤¥Ð¤Ï Simon Janes  <CODE>simon@ncm.com</CODE> ¤¬³«È¯¤·¤Þ¤·¤¿¡£
<P>
<H2><A NAME="ss6.3">6.3 IP ¥Ñ¥±¥Ã¥ÈÅý·×¾ðÊó¤Î¼èÆÀ(Linux 2.0 ÍÑ)</A>
</H2>

<P>¥«¡¼¥Í¥ë¤Ë IP ¥Ñ¥±¥Ã¥ÈÅý·×¾ðÊó¤Î¼èÆÀµ¡Ç½(IP accounting µ¡Ç½)¤òÁȤ߹þ¤á
¤Ð¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤Î»ÈÍѵ­Ï¿¤ò¼è¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£µ­Ï¿¤Ç¤­¤ë¥Ç¡¼¥¿¤Ï¡¢ºÇ
¸å¤Ë¥«¥¦¥ó¥¿¤ò¥ê¥»¥Ã¥È¤·¤Æ¤«¤é¤ä¤ê¤È¤ê¤·¤¿¥Ñ¥±¥Ã¥È¿ô¤È¥Ç¡¼¥¿¤Î¥Ð¥¤¥È¿ô
¤Ç¤¹¡£¥«¥Æ¥´¥ê¤´¤È¤Ë°Û¤Ê¤ë¥ë¡¼¥ë¤ò»ØÄê¤Ç¤­¡¢ÌÜŪ¤Ë±þ¤¸¤¿ÀßÄ꤬²Äǽ¤Ç¤¹¡£
¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¥«¡¼¥Í¥ë 2.1.102 ¤Ç¤Ê¤¯¤Ê¤ê¤Þ¤·¤¿¡£¸Å¤¤ ipfwadm ¥Ù¡¼¥¹
¤Î¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤¬ ``ipfwchains'' ¤Ë¤è¤Ã¤ÆÃÖ¤­´¹¤¨¤é¤ì¤¿¤«¤é¤Ç¤¹¡£
<P>
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
        Networking options  --->
            [*] IP: accounting
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¥«¡¼¥Í¥ë¤ËɬÍפʵ¡Ç½¤òÁȤ߹þ¤ó¤ÇºÆµ¯Æ°¤·¤¿¸å¡¢<EM>ipfwadm</EM> ¥³¥Þ¥ó
¥É¤ò»È¤Ã¤Æ IP ¥Ñ¥±¥Ã¥ÈÅý·×¼èÆÀµ¡Ç½¤òÀßÄꤷ¤Þ¤¹¡£IP ¥Ñ¥±¥Ã¥È¤ÎÅý·×¾ðÊó
¤òºÙʬ¤¹¤ë¤¿¤á¤ÎÊýË¡¤Ï¤¤¤í¤¤¤í¤¢¤ê¤Þ¤¹¡£°Ê²¼¤Ë¼ÂºÝ¤Ë»È¤¨¤½¤¦¤Ê´Êñ¤ÊÀß
ÄêÎã¤ò¼¨¤·¤Æ¤ß¤Þ¤¹¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï <EM>ipfwadm</EM> ¤Î man ¥Ú¡¼¥¸¤òÆÉ
¤ó¤Ç¤¯¤À¤µ¤¤¡£
<P>¾õ¶·ÀßÄê: PPP ·Ðͳ¤Ç¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤µ¤ì¤¿¥¤¡¼¥µ¥Í¥Ã¥È¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤¬
¤¢¤ë¤È¤·¤Þ¤¹¡£¥¤¡¼¥µ¥Í¥Ã¥È¤Î¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ë¤Ï¤µ¤Þ¤¶¤Þ¤Ê¥µ¡¼¥Ó¥¹¤òÄó¶¡
¤·¤Æ¤¤¤ë¥Þ¥·¥ó¤¬¤¢¤ê¡¢ftp ¤ä WWW ¤È¤¤¤Ã¤¿¥È¥é¥Õ¥£¥Ã¥¯¤¬¤É¤ì¤¯¤é¤¤À¸¤¸
¤Æ¤¤¤ë¤«¤òÃΤꤿ¤¤¤È¤·¤Þ¤¹¡£¤Þ¤¿ tcp, udp Á´ÂΤˤĤ¤¤Æ¤âƱÍͤΤ³¤È¤ò
ÃΤꤿ¤¤¤È¤·¤Þ¤¹¡£
<P>°Ê²¼¤Î¤è¤¦¤Ê¥³¥Þ¥ó¥É·²¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£¥·¥§¥ë¥¹¥¯¥ê¥×¥È
¤Î·Á¤Ë¤Þ¤È¤á¤Æ¼¨¤·¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/sh
        #
        # Flush the accounting rules
        ipfwadm -A -f
        #
        # Set shortcuts
        localnet=44.136.8.96/29
        any=0/0
        # Add rules for local ethernet segment
        ipfwadm -A in  -a -P tcp -D $localnet ftp-data
        ipfwadm -A out -a -P tcp -S $localnet ftp-data
        ipfwadm -A in  -a -P tcp -D $localnet www
        ipfwadm -A out -a -P tcp -S $localnet www
        ipfwadm -A in  -a -P tcp -D $localnet
        ipfwadm -A out -a -P tcp -S $localnet
        ipfwadm -A in  -a -P udp -D $localnet
        ipfwadm -A out -a -P udp -S $localnet
        #
        # Rules for default
        ipfwadm -A in  -a -P tcp -D $any ftp-data
        ipfwadm -A out -a -P tcp -S $any ftp-data
        ipfwadm -A in  -a -P tcp -D $any www
        ipfwadm -A out -a -P tcp -S $any www
        ipfwadm -A in  -a -P tcp -D $any
        ipfwadm -A out -a -P tcp -S $any
        ipfwadm -A in  -a -P udp -D $any
        ipfwadm -A out -a -P udp -S $any
        #
        # List the rules
        ipfwadm -A -l -n
        #
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>``ftp-data'' ¤ä ``www'' ¤È¤¤¤Ã¤¿Ì¾Á°¤Ï <CODE>/etc/services</CODE> ¤Ë¤ª
¤±¤ëÀßÄê¤ò»²¾È¤·¤Þ¤¹¡£ºÇ¸å¤Î¥³¥Þ¥ó¥É¤Ï¤½¤ì¤¾¤ì¤Î IP ¥Ñ¥±¥Ã¥ÈÅý·×¤Î¼èÆÀ
µ¬Â§¤òÎóµó¤·¡¢½¸¤á¤¿¥Ç¡¼¥¿¤Î¹ç·×Ãͤòɽ¼¨¤·¤Þ¤¹¡£
<P>
<P>IP ¥Ñ¥±¥Ã¥ÈÅý·×¾ðÊó¤ò²òÀϤ¹¤ëºÝ¤ËÃí°Õ¤¹¤Ù¤­¤Ê¤Î¤Ï¡¢<B>¥Þ¥Ã¥Á¤·¤¿¤¹
¤Ù¤Æ¤Îµ¬Â§¤Ë¤ª¤±¤ë³Æ¹ç·×¥¨¥ê¥¢¤ËÂФ·¤Æ(žÁ÷¥Ð¥¤¥È¿ô¤ä¥Ñ¥±¥Ã¥È¿ô¤¬)¤½¤ì
¤¾¤ì­¤·¤³¤Þ¤ì¤ë</B>¤È¤¤¤¦¤³¤È¤Ç¤¹¡£¤³¤Î¤¿¤á¡¢º¹¤È¤·¤Æ¸½¤ì¤ëÃͤòÆÀ¤ë
¤Ë¤Ï¿¾¯¤Î·×»»¤¬É¬ÍפǤ¹¡£Î㤨¤Ð¡¢ftp ¤Ç¤â www ¤Ç¤â¤Ê¤¤¥Ç¡¼¥¿Î̤òÃΤë
¤¿¤á¤Ë¤Ï¡¢Á´¤Æ¤Î¥Ý¡¼¥È¤Ë¥Þ¥Ã¥Á¤¹¤ëµ¬Â§¤è¤êÆÀ¤¿Å¾Á÷Î̤«¤é¡¢ftp ¤ä www 
¤È¤¤¤Ã¤¿¸Ä¡¹¤Î¥×¥í¥È¥³¥ë¤ÇžÁ÷¤·¤¿¥Ç¡¼¥¿Î̤ò°ú¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
root# ipfwadm -A -l -n
IP accounting rules
 pkts bytes dir prot source               destination          ports
    0     0 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 20
    0     0 out tcp  44.136.8.96/29       0.0.0.0/0            20 -> *
   10  1166 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> 80
   10   572 out tcp  44.136.8.96/29       0.0.0.0/0            80 -> *
  252 10943 in  tcp  0.0.0.0/0            44.136.8.96/29       * -> *
  231 18831 out tcp  44.136.8.96/29       0.0.0.0/0             * -> *
    0     0 in  udp  0.0.0.0/0            44.136.8.96/29       * -> *
    0     0 out udp  44.136.8.96/29       0.0.0.0/0            * -> *
    0     0 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 20
    0     0 out tcp  0.0.0.0/0            0.0.0.0/0            20 -> *
   10  1166 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> 80
   10   572 out tcp  0.0.0.0/0            0.0.0.0/0            80 -> *
  253 10983 in  tcp  0.0.0.0/0            0.0.0.0/0            * -> *
  231 18831 out tcp  0.0.0.0/0            0.0.0.0/0            * -> *
    0     0 in  udp  0.0.0.0/0            0.0.0.0/0            * -> *
    0     0 out udp  0.0.0.0/0            0.0.0.0/0            * -> *
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="ss6.4">6.4 IP¥Ñ¥±¥Ã¥ÈÅý·×¼èÆÀ(Linux 2.2 ÍÑ)</A>
</H2>

<P>¿·¤·¤¤ IP ¥Ñ¥±¥Ã¥ÈÅý·×¼èÆÀµ¡Ç½¤Ï¡ÖIP Firewall Chains¡×¤òÄ̤¸¤ÆÍøÍÑ
¤·¤Þ¤¹¡£¾Ü¤·¤¯¤Ï
<A HREF="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html">IP chains ¤Î¥Û¡¼¥à¥Ú¡¼¥¸</A>
¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£ÆäËÃí°Õ¤¹¤Ù¤­¤Ê¤Î¤Ï¡¢¥Õ¥£¥ë¥¿¤ÎÀßÄê¤Ë¤Ï <CODE>ipfwadm</CODE>
¤Ç¤Ï¤Ê¤¯ <EM>ipchains</EM> ¤ò»È¤¦É¬Íפ¬¤¢¤ëÅÀ¤Ç¤¹(ºÇ¿·ÈÇ¥«¡¼¥Í¥ë¤Î
<CODE>Documentation/Changes</CODE> ¤è¤ê)¡£
<P>
<H2><A NAME="ss6.5">6.5 IP ¥¨¥¤¥ê¥¢¥¹</A>
</H2>

<P>1 ¤Ä¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¤ËÊ£¿ô¸Ä¤Î IP ¥¢¥É¥ì¥¹¤òÀßÄê¤Ç¤­¤ë¤ÈÊØÍø
¤ÊÍÑÅÓ¤¬¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À(ISP)¤Ï¤è¤¯
¤³¤Îµ¡Ç½¤òÍѤ¤¤Æ¡¢¸ÜµÒ¤Ë¹ç¤ï¤»¤Æ¡Ö¥«¥¹¥¿¥Þ¥¤¥º¤·¤¿¡×WWW ¥µ¡¼¥Ó¥¹¤ä ftp
¥µ¡¼¥Ó¥¹¤òÄ󶡤·¤Æ¤¤¤Þ¤¹¡£¤³¤³¤Ë½ñ¤¤¤Æ¤¤¤ë°Ê¾å¤Î¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢
``IP-Alias mini-HOWTO'' ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
<P>
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
        Networking options  --->
            ....
            [*] Network aliasing
            ....
            &lt;*> IP: aliasing support
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>IP_Alias µ¡Ç½¤òÁȤ߹þ¤ó¤À¥«¡¼¥Í¥ë¤ò¹½ÃÛ¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤·¤Þ¤¨¤Ð¡¢
¤³¤Îµ¡
ǽ¤òÀßÄꤹ¤ë¤Î¤Ï¤´¤¯´Êñ¤Ç¤¹¡£alias µ¡Ç½¤Ï¡¢¼ÂºÝ¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹
¤Ë²¾ÁÛŪ¤Ê¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¤ò´ØÏ¢¤Å¤±¤ÆÄɲä·¤Þ¤¹¡£²¾ÁÛŪ¤Ê¥Ç¥Ð¥¤¥¹¤Ë³ä¤ê¤¢
¤Æ¤ë̾Á°¤Ï¡¢<CODE>&lt;devname&gt;:&lt;virtual dev num&gt;</CODE> ¤Î·Á¤Ç¡¢
<CODE>eth0:0</CODE>¡¢<CODE>ppp0:10</CODE> ¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ifname:number ·Á¼°¤Î¥Ç¥Ð¥¤¥¹
¤Ï¡¢¥á¥¤¥ó¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÎÀßÄê<EM>¸å</EM>¤Ç¤Ê¤±¤ì¤ÐÀßÄê¤Ç¤­¤Ê¤¤ÅÀ¤Ë
Ãí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>
<P>¤¿¤È¤¨¤Ð¡¢ 2 ¤Ä¤Î°Û¤Ê¤Ã¤¿ IP ¥µ¥Ö¥Í¥Ã¥È¥ï¡¼¥¯¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë
¥¤¡¼¥µ¥Í¥Ã¥È¥Í¥Ã¥È¥ï¡¼¥¯¤ËÀܳ
¤·¤¿¥Þ¥·¥ó¤¬¤¢¤ë¤È¤·¤Æ¡¢Æ±»þ¤ËÁÐÊý¤Î¥µ¥Ö¥Í¥Ã¥È¤Ë¥¢¥¯¥»¥¹¤·¤¿¤¤¾ì¹ç¡¢
°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
        root# route add -net 192.168.1.0 netmask 255.255.255.0 eth0

        root# ifconfig eth0:0 192.168.10.1 netmask 255.255.255.0 up
        root# route add -net 192.168.10.0 netmask 255.255.255.0 eth0:0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¥¨¥¤¥ê¥¢¥¹¤òºï½ü¤¹¤ë¾ì¹ç¡¢²¾ÁÛŪ¤Ê¥Ç¥Ð¥¤¥¹Ì¾¤Î¸å¤Ë `<CODE>-</CODE>' ¤òÉÕ¤±¤Æ 
<CODE>ifconfig</CODE> ¤·¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# ifconfig eth0:0- 0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>²¾ÁۥǥХ¤¥¹¤òºï½ü¤¹¤ì¤Ð¡¢´ØÏ¢¤·¤¿·ÐÏ©¤âÁ´¤Æ¼«Æ°Åª¤Ëºï½ü¤µ¤ì¤Þ¤¹¡£
<P>
<H2><A NAME="ss6.6">6.6 IP ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë(Linux 2.0 ÍÑ)</A>
</H2>

<P>IP ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤È¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ëÁ´È̤ˤĤ¤¤Æ¤Ï
<A HREF="Firewall-HOWTO.html">Firewall-HOWTO</A>
¤ÎÊý¤¬¤º¤Ã¤È¾Ü¤·¤¯°·¤Ã¤Æ¤¤¤Þ¤¹¡£IP ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ò»È¤¨¤Ð¡¢µö²Ä¤·¤¿ 
IP ¥¢¥É¥ì¥¹¤«¤é¤Î¥Ç¡¼¥¿¥°¥é¥à°Ê³°¤ÏÄ̤µ¤Ê¤¤¤è¤¦¤ËÀßÄê¤Ç¤­¤Þ¤¹¡£
¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ÎÀßÄê¤Ë¤Ï¡¢Æþ¤Ã¤Æ¤¯¤ë¥Ç¡¼¥¿¥°¥é¥à¤ËÂФ¹¤ë¤â¤Î¡¢½Ð¤Æ¤¤
¤¯¥Ç¡¼¥¿¥°¥é¥à¤ËÂФ¹¤ë¤â¤Î¡¢ÆâÉô¤ÇžÁ÷(forward)¤¹¤ë¥Ç¡¼¥¿¥°¥é¥à¤ËÂФ¹
¤ë¤â¤Î¤Î 3 ¼ïÎब¤¢¤ê¤Þ¤¹¡£
Æþ¤Ã¤Æ¤¯¤ë¥Ç¡¼¥¿¥°¥é¥à¤ËÂФ¹¤ë¥ë¡¼¥ë¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¤¬¼õ¤±¤È¤Ã¤¿
¥Ç¡¼¥¿¥°¥é¥à¤ËÂФ·¤ÆŬÍѤµ¤ì¡¢½Ð¤Æ¤¤¤¯¥Ç¡¼¥¿¥°¥é¥à¤ËÂФ¹¤ë¥ë¡¼¥ë¤Ï¥Í¥Ã
¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¤¬Á÷½Ð¤¹¤ë¥Ç¡¼¥¿¥°¥é¥à¤ËŬÍѤµ¤ì¤Þ¤¹¡£Å¾Á÷¤¹¤ë¥Ç¡¼¥¿¥°¥é¥à
¤ËÂФ¹¤ë¥ë¡¼¥ë¤Ï¡¢¼õ¤±¤È¤Ã¤¿¤â¤Î¤Î¡¢¼«Ê¬°¸¤Æ¤Ç¤Ï¤Ê¤¤¥Ç¡¼¥¿¥°¥é¥à¡¢¤¹¤Ê
¤ï¤ÁÊ̤ηÐÏ©¤ËÁ÷¤ê½Ð¤¹¥Ç¡¼¥¿¥°¥é¥à¤ËŬÍѤµ¤ì¤Þ¤¹¡£
<P>
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
        Networking options  --->
            [*] Network firewalls
            ....
            [*] IP: forwarding/gatewaying
            ....
            [*] IP: firewalling
            [ ] IP: firewall packet logging
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>IP ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ëµ¡Ç½¤Ï <EM>ipfwadm</EM> ¥³¥Þ¥ó¥É¤ò»È¤Ã¤ÆÀßÄꤷ¤Þ¤¹¡£
°ÊÁ°¤Ë¤â½Ò¤Ù¤Þ¤·¤¿¤¬¡¢»ä¤Ï¥»¥­¥å¥ê¥Æ¥£¤Ë¤Ä¤¤¤Æ¤ÎÀìÌç²È¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
°Ê²¼¤Ë±þÍѲÄǽ¤Ê´Êñ¤ÊÎã¤ò¾Ò²ð¤·¤Þ¤¹¤¬¡¢¥»¥­¥å¥ê¥Æ¥£¤¬½ÅÍפÊÌäÂê¤Ê¤é¤Ð¡¢
¤´¼«Ê¬¤Ç¸¦µæ¤·¤ÆɬÍפÊÀßÄê¤ò³«È¯¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>IP ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ëµ¡Ç½¤ÎºÇ¤â°ìÈÌŪ¤Ê»È¤¤Êý¤Ï¡¢Linux ¥Þ¥·¥ó¤ò¥ë¡¼¥¿¤ä
¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¥²¡¼¥È¥¦¥§¥¤¤È¤·¤ÆÍѤ¤¡¢¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¤ò
¥Í¥Ã¥È¥ï¡¼¥¯³°Éô¤«¤é¤Îµö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¥¢¥¯¥»¥¹¤«¤é¼é¤ë¤³¤È¤Ç¤·¤ç¤¦¡£
<P>°Ê²¼¤ÎÀßÄê¤Ï Arnt Gulbrandsen <CODE>&lt;agulbra@troll.no&gt;</CODE> ¤¬Êó¹ð
¤·¤Æ¤¯¤ì¤¿¤â¤Î¤Ë´ð¤Å¤¤¤Æ¤¤¤Þ¤¹¡£
<P>°Ê²¼¤ËÍѤ¤¤ëÎã¤Ç¤Ï¡¢²¼¿Þ¤Î¤è¤¦¤ÊÀßÄê¤Ç¡¢Linux ¥Þ¥·¥ó¤ò¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë
/¥ë¡¼¥¿¤Ë¤·¤Æ¤¤¤Þ¤¹¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
-                                   -
 \                                  | 172.16.37.0
  \                                 |   /255.255.255.0
   \                 ---------      |
    |  172.16.174.30 | Linux |      |
NET =================|  f/w  |------|    ..37.19
    |    PPP         | router|      |  --------
   /                 ---------      |--| Mail |
  /                                 |  | /DNS |
 /                                  |  --------
-                                   -
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤òÀßÄꤹ¤ë¤¿¤á¤Î¥³¥Þ¥ó¥É¤Ï¡¢Ä̾ï <CODE>rc</CODE> ¥Õ¥¡¥¤¥ë¤Ë
¤Þ¤È¤á¤Æ¡¢¥·¥¹¥Æ¥à¤Îµ¯Æ°»þ¤Ë¼«Æ°Åª¤Ë¼Â¹Ô¤¹¤ë¤è¤¦¤ËÀßÄꤷ¤Þ¤¹¡£¥»¥­¥å¥ê
¥Æ¥£¤òºÇÂç¸Â¤Ë¶¯²½¤¹¤ë¤Ë¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤¬ÀßÄꤵ¤ì¤Æ¤«
¤é¤³¤ì¤é¤ÎÀßÄê¤ò¹Ô¤¦¤Ù¤­¤Ç¤¹¤¬¡¢¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¥Þ¥·¥ó¤ò¥ê¥Ö¡¼¥È¤·¤¿ºÝ
¤Ë狼¤¬¥¤¥¿¥º¥é¤¹¤ë¤Î¤òËɤ°¤¿¤á¡¢¥Í¥Ã¥È¥ï¡¼¥¯ÀßÄê¤ÎÁ°¤Ë¼Â¹Ô¤¹¤ëɬ
Íפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/sh

        # Flush the 'Forwarding' rules table
        # Change the default policy to 'accept'
        #
        /sbin/ipfwadm -F -f
        /sbin/ipfwadm -F -p accept
        #
        # .. and for 'Incoming'
        #
        /sbin/ipfwadm -I -f
        /sbin/ipfwadm -I -p accept

        # First off, seal off the PPP interface
        # I'd love to use '-a deny' instead of '-a reject -y' but then it
        # would be impossible to originate connections on that interface too.
        # The -o causes all rejected datagrams to be logged. This trades
        # disk space against knowledge of an attack of configuration error.
        #
        /sbin/ipfwadm -I -a reject -y -o -P tcp -S 0/0 -D 172.16.174.30

        # Throw away certain kinds of obviously forged packets right away:
        # Nothing should come from multicast/anycast/broadcast addresses
        #
        /sbin/ipfwadm -F -a deny -o -S 224.0/3 -D 172.16.37.0/24
        #
        # and nothing coming from the loopback network should ever be
        # seen on a wire
        #
        /sbin/ipfwadm -F -a deny -o -S 127.0/8 -D 172.16.37.0/24
        
        # accept incoming SMTP and DNS connections, but only
        # to the Mail/Name Server
        #
        /sbin/ipfwadm -F -a accept -P tcp -S 0/0 -D 172.16.37.19 25 53
        #
        # DNS uses UDP as well as TCP, so allow that too
        # for questions to our name server
        #
        /sbin/ipfwadm -F -a accept -P udp -S 0/0 -D 172.16.37.19 53
        #
        # but not "answers" coming to dangerous ports like NFS and
        # Larry McVoy's NFS extension.  If you run squid, add its port here.
        #
        /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 53 \
                -D 172.16.37.0/24 2049 2050
        
        # answers to other user ports are okay
        #
        /sbin/ipfwadm -F -a accept -P udp -S 0/0 53 \
                -D 172.16.37.0/24 53 1024:65535
        
        # Reject incoming connections to identd
        # We use 'reject' here so that the connecting host is told
        # straight away not to bother continuing, otherwise we'd experience
        # delays while ident timed out.
        #
        /sbin/ipfwadm -F -a reject -o -P tcp -S 0/0 -D 172.16.37.0/24 113

        # Accept some common service connections from the 192.168.64 and
        # 192.168.65 networks, they are friends that we trust.
        #
        /sbin/ipfwadm -F -a accept -P tcp -S 192.168.64.0/23 \
                -D 172.16.37.0/24 20:23
        
        # accept and pass through anything originating inside
        #
        /sbin/ipfwadm -F -a accept -P tcp -S 172.16.37.0/24 -D 0/0
        
        # deny most other incoming TCP connections and log them
        # (append 1:1023 if you have problems with ftp not working)
        #
        /sbin/ipfwadm -F -a deny -o -y -P tcp -S 0/0 -D 172.16.37.0/24
        
        # ... for UDP too
        #
        /sbin/ipfwadm -F -a deny -o -P udp -S 0/0 -D 172.16.37.0/24
        
</PRE>
</CODE></BLOCKQUOTE>
<P>¤è¤¤¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ÎÀßÄê¤Ï¿¾¯¥È¥ê¥Ã¥­¡¼¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤â¤Î¤Ç¤¹¤¬¡¢¤³¤³
¤Ë¼¨¤·¤¿Îã¤Ï½ÐȯÅÀ¤È¤·¤Æ½½Ê¬Ìò¤ËΩ¤Ä¤Ï¤º¤Ç¤¹¡£
ÀßÄêÊýË¡¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï <EM>ipfwadm</EM> ¤Î man ¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ¤¯¤À
¤µ¤¤¡£¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤òÀßÄꤹ¤ë¾ì¹ç¡¢¼þ°Ï¤Î¿Í¤Ë¤¿¤º¤Í¤Æ¡¢¿®Íꤹ¤ë¤Ë­
¤ë¾ðÊ󸻤«¤é¤Î¥¢¥É¥Ð¥¤¥¹¤ò²Äǽ¤Ê¸Â¤ê¼õ¤±¤Æ¤¯¤À¤µ¤¤¡£¤½¤·¤Æ¡¢ÀßÄ꤬Àµ¤·
¤¯µ¡Ç½¤·¤Æ¤¤¤ë¤«¤É¤¦¤«¡¢³°Éô¤«¤é³Îǧ¤·¤Æ¤â¤é¤¤¤Þ¤·¤ç¤¦¡£
<P>
<H2><A NAME="ss6.7">6.7 IP ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë (Linux 2.2 ÍÑ)</A>
</H2>

<P>¿·¤·¤¤¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ëµ¡Ç½¤Ï ``IP Firewall Chains'' ¤ò»È¤Ã¤ÆÍøÍѤÇ
¤­¤Þ¤¹¡£¾Ü¤·¤¯¤Ï
<A HREF="http://www.adelaide.net.au/~rustcorp/ipfwchains/ipfwchains.html">IP chains ¤Î¥Û¡¼¥à¥Ú¡¼¥¸</A> 
¤ò¸«¤Æ¤¯¤À¤µ¤¤¡£ÆäËÃí°Õ¤¹¤Ù¤­¤Ê¤Î¤Ï¡¢¥Õ¥£¥ë¥¿¤ÎÀßÄê¤Ë¤Ï <CODE>ipfwadm</CODE>
¤Ç¤Ï¤Ê¤¯ <EM>ipchains</EM> ¤ò»È¤¦É¬Íפ¬¤¢¤ëÅÀ¤Ç¤¹(ºÇ¿·ÈÇ¥«¡¼¥Í¥ë¤Î
<CODE>Documentation/Changes</CODE> ¤è¤ê)¡£
<P>¤³¤ÎÀâÌÀ¤ÏÈó¾ï¤Ë¸Å¤¯¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤ÏÉ®¼Ô¤é¤â¤ï¤«¤Ã¤Æ¤ª¤ê¡¢¤³¤ÎÀá¤ò½ñ¤­
ľ¤¹¤Ù¤¯¸½ºßºî¶ÈÃæ¤Ç¤¹¡£1999 ǯ¤Î 8 ·î¤Ë¤Ï¿·¤·¤¤ÈǤò½Ð¤¹¤Î¤Ç¤ªÂÔ¤Á¤¯¤À
¤µ¤¤¡£
<P>
<H2><A NAME="ss6.8">6.8 IPIP ¥«¥×¥»¥ë²½</A>
</H2>

<P>IP ¥Ç¡¼¥¿¥°¥é¥à¤ÎÃæ¤Ë IP ¥Ç¡¼¥¿¥°¥é¥à¤ò¥«¥×¥»¥ë²½¤·¤ÆÆþ¤ì¤ë¤È¡¢¤Ê¤ó¤ÎÌò¤ËΩ¤Ä¤ó
¤Ç¤·¤ç¤¦¤«? Á°¤â¤Ã¤Æ»È¤¤ÅÓ¤òÃΤäƤ¤¤Ê¤±¤ì¤Ð¡¢¤³¤Î¼êË¡¤Ï¤­¤Ã¤È´ñ̯¤Ë»×
¤¨¤ë¤³¤È¤Ç¤·¤ç¤¦¡£¤Ç¤Ï¡¢¤³¤ì¤¬¤è¤¯»È¤ï¤ì¤ëÌÜŪ¤ò 2 ¤Ä¼¨¤·¤Þ¤·¤ç¤¦¡£
¥â¥Ð¥¤¥ë IP ¤È IP ¥Þ¥ë¥Á¥­¥ã¥¹¥È¤Ç¤¹¡£¤â¤Ã¤È¤â¹­¤¯»È¤ï¤ì¤Æ¤¤¤ë¤±
¤ì¤É¡¢¤Û¤È¤ó¤ÉÃΤé¤ì¤Æ¤¤¤Ê¤¤ÍøÍÑÌÜŪ¤È¤·¤Æ¤Ï¥¢¥Þ¥Á¥å¥¢ÌµÀþ¤¬¤¢¤ê¤Þ¤¹¡£
<P>
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
        Networking options  --->
            [*] TCP/IP networking
            [*] IP: forwarding/gatewaying
            ....
            &lt;*> IP: tunneling
        
</PRE>
</CODE></BLOCKQUOTE>
<P>IP ¥È¥ó¥Í¥ë¥Ç¥Ð¥¤¥¹¤Ï `<CODE>tunl0</CODE>', `<CODE>tunl1</CODE>' Åù¤È¤Ê¤ê¤Þ¤¹¡£
<P>¡Ö¤Ç¤â¡¢¤É¤¦¤·¤Æ¤³¤ó¤Ê¤â¤Î¤ò»È¤¦¤Î?¡×¤«¤Ã¤Æ? ¤Ï¤¤¤Ï¤¤¡¢ÀâÌÀ¤·¤Þ¤·¤ç¤¦¡£
º£¤Þ¤Ç¤Î IP ·ÐÏ©À©¸æ¤Ç¤Ï¡¢IP ¥Í¥Ã¥È¥ï¡¼¥¯¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤È
¥Í¥Ã¥È¥ï¡¼¥¯¥Þ¥¹¥¯¤«¤é¹½À®¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤·¤¿¡£¤³¤ì¤Ë¤è¤ê¡¢Ï¢Â³
¤·¤¿°ìÏ¢¤Î¥¢¥É¥ì¥¹¤ÎÁ´¤Æ¤ËÂФ·¤Æ 1 ¤Ä¤Î·ÐÏ©À©¸æ¥¨¥ó¥È¥ê¤ò»È¤Ã¤¿·ÐÏ©À©¸æ
¤¬¹Ô¤¨¤Þ¤·¤¿¡£¤³¤ì¤ÏÂçÊÑÊØÍø¤Ç¤¹¤¬¡¢¤¢¤ëÆÃÄê¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Î°ìÉô¤ËÀܳ
¤·¤Æ¤¤¤ë´Ö¤ÏÆÃÄê¤Î IP ¥¢¥É¥ì¥¹¤·¤«»È¤¨¤Ê¤¤¤È¤¤¤¦¤³¤È¤Ç¤â¤¢¤ê¤Þ¤¹¡£¤Û¤È
¤ó¤É¤Î¾ì¹ç¤Ï¤³¤ì¤Ç¤âÂç¾æÉפʤΤǤ¹¤¬¡¢¤¢¤Ê¤¿¤¬¥â¥Ð¥¤¥ëÇɤǤ¢¤ì¤Ð¡¢¤º¤Ã
¤È 1 ¤Ä¤Î¾ì½ê¤ËÀܳ¤·¤¿¤Þ¤Þ¤È¤¤¤¦¤ï¤±¤Ë¤Ï¤¤¤«¤Ê¤¤¤È»×¤¤¤Þ¤¹¡£
IP/IP ¥«¥×¥»¥ë²½(IP ¥È¥ó¥Í¥ê¥ó¥°)¤ò»È¤¦¤È¡¢¼«Ê¬¤Î IP ¥¢¥É¥ì¥¹°¸¤Î
¥Ç¡¼¥¿¥°¥é¥à¤Ë IP ¤ÎÈé¤ò¤«¤Ö¤»¤ÆÊ̤ΠIP ¥¢¥É¥ì¥¹¤ËÁ÷¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢¤³
¤ÎÀ©¸Â¤ò¹îÉþ¤Ç¤­¤Þ¤¹¡£¤·¤Ð¤é¤¯Ê̤ΠIP ¥Í¥Ã¥È¥ï¡¼¥¯¤Çºî¶È¤ò¤¹¤ë¤³¤È¤¬Ê¬
¤«¤Ã¤Æ¤¤¤ì¤Ð¡¢¼«Ê¬¤Î¸µ¡¹¤Î¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Î¥Þ¥·¥ó¤¬¤¢¤Ê¤¿¤Î IP ¥¢¥É¥ì¥¹
°¸¤Î¥Ç¡¼¥¿¥°¥é¥à¤ò¼õ¤±ÉÕ¤±¡¢¤³¤ì¤ò¸½ºß°ì»þŪ¤Ë»È¤Ã¤Æ¤¤¤ë¥¢¥É¥ì¥¹¤ËÁ÷¤ë
¤è¤¦¤ËÀßÄê¤Ç¤­¤Þ¤¹¡£
<P>
<P>
<H3>¥È¥ó¥Í¥ê¥ó¥°¤ò¹Ô¤¦¥Í¥Ã¥È¥ï¡¼¥¯ÀßÄê</H3>

<P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
 192.168.1/24                          192.168.2/24

     -                                     -
     |      ppp0 =            ppp0 =       |
     |  aaa.bbb.ccc.ddd  fff.ggg.hhh.iii   |
     |                                     |
     |   /-----\                 /-----\   |
     |   |     |       //        |     |   |
     |---|  A  |------//---------|  B  |---|
     |   |     |     //          |     |   |
     |   \-----/                 \-----/   |
     |                                     |
     -                                     -
</PRE>
</CODE></BLOCKQUOTE>
<P>¤³¤Î¿Þ¤Ï¡¢IPIP ¥«¥×¥»¥ë²½¤¬É¬ÍפȤʤëÊ̤ÎÍýͳ¡¢¤¹¤Ê¤ï¤Á
²¾Áۥץ饤¥Ù¡¼¥È¥Í¥Ã¥È¥ï¡¼¥¯(virtual private networking, VPN)¤ò¼¨¤·¤Æ
¤¤¤Þ¤¹¡£¤³¤ÎÎã¤Ç¤Ï¡¢¥À¥¤¥¢¥ë¥¢¥Ã¥×¤Ë¤è¤ëñ½ã¤Ê¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÀܳ¤ò¤·¤Æ
¤¤¤ë¥Þ¥·¥ó¤¬ 2 Â椢¤ë¤³¤È¤òÁ°Äó¤È¤·¤Þ¤¹¡£¤½¤ì¤¾¤ì¤Î¥Û¥¹¥È¤Ï IP ¥¢¥É¥ì
¥¹¤ò 1 ¤Ä¤À¤±³ä¤êÅö¤Æ¤é¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤é¤Î¥Þ¥·¥ó¤Î¸å¤í¤Ë¤Ï¡¢Í½ÌóºÑ¤ß
¤Î IP ¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹¤ò»È¤¦ÀßÄê¤Î¥×¥é¥¤¥Ù¡¼¥È¤Ê LAN ¤¬¤¤¤¯¤Ä¤«¤¢
¤ê¤Þ¤¹¡£¤³¤Î¤È¤­¡¢¥Í¥Ã¥È¥ï¡¼¥¯ A ¾å¤Î¥Û¥¹¥È¤È¥Í¥Ã¥È¥ï¡¼¥¯ B ¾å¤Î¥Û¥¹¥È
¤ò¡¢¤¢¤ë¥Í¥Ã¥È¥ï¡¼¥¯·ÐÏ©¤ò»È¤Ã¤ÆÀµ¤·¤¯¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤¤ë¤«¤Î
¤è¤¦¤ËÀܳ¤·¤¿¤¤¤È¤·¤Þ¤¹¡£IPIP ¥«¥×¥»¥ë²½¤ò»È¤¦¤È¤³¤ì¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
¥«¥×¥»¥ë²½¤Ç¤Ï¡¢¥Í¥Ã¥È¥ï¡¼¥¯ A ¤È B ¤Î¥Û¥¹¥È¤ò¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤ÎÊ̤ΥÛ
¥¹¥È¤ÈÄÌ¿®¤µ¤»¤ë¤È¤¤¤¦ÌäÂê¤Ï²ò·è¤µ¤ì¤Ê¤¤¤Î¤ÇÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤³¤ì¤ò
¹Ô¤¦¤Ë¤Ï¡¢¤µ¤é¤Ë IP ¥Þ¥¹¥«¥ì¡¼¥ÉÅù¤Îµ»¤¬É¬ÍפȤʤê¤Þ¤¹¡£¥«¥×¥»¥ë²½¤ÏÉá
ÄÌ¡¢¥Þ¥·¥ó¤ò¥ë¡¼¥¿¤Î¤è¤¦¤Ëµ¡Ç½¤µ¤»¤ë¤³¤È¤Ç¼Â¸½¤·¤Þ¤¹¡£
<P>
<P>Linux ¤Ë¤è¤ë¥ë¡¼¥¿ `<CODE>A</CODE>' ¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ê¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤ÆÀßÄꤷ¤Þ
¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/sh
        PATH=/sbin:/usr/sbin
        mask=255.255.255.0
        remotegw=fff.ggg.hhh.iii
        #
        # Ethernet configuration
        ifconfig eth0 192.168.1.1 netmask $mask up
        route add -net 192.168.1.0 netmask $mask eth0
        #
        # ppp0 configuration (start ppp link, set default route)
        pppd
        route add default ppp0
        #
        # Tunnel device configuration
        ifconfig tunl0 192.168.1.1 up
        route add -net 192.168.2.0 netmask $mask gw $remotegw tunl0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>Linux ¤Ë¤è¤ë¥ë¡¼¥¿ `<CODE>B</CODE>' ¤âƱÍͤΥ¹¥¯¥ê¥×¥È¤ò»È¤Ã¤ÆÀßÄꤷ¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/sh
        PATH=/sbin:/usr/sbin
        mask=255.255.255.0
        remotegw=aaa.bbb.ccc.ddd
        #
        # Ethernet configuration
        ifconfig eth0 192.168.2.1 netmask $mask up
        route add -net 192.168.2.0 netmask $mask eth0
        #
        # ppp0 configuration (start ppp link, set default route)
        pppd
        route add default ppp0
        #
        # Tunnel device configuration
        ifconfig tunl0 192.168.2.1 up
        route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>°Ê²¼¤Î¥³¥Þ¥ó¥É
<P>
<BLOCKQUOTE><CODE>
<PRE>
        route add -net 192.168.1.0 netmask $mask gw $remotegw tunl0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>¤Ï¡¢¡Ö<CODE>192.168.1.0/24</CODE>°¸¤ÎÁ´¤Æ¤Î¥Ç¡¼¥¿¥°¥é¥à¤ò¡¢½ªÅÀ¥¢¥É¥ì¥¹¤¬
<CODE>aaa.bbb.ccc.ddd</CODE> ¤Ç¤¢¤ë IPIP ¥«¥×¥»¥ë²½¥Ç¡¼¥¿¥°¥é¥à¤ÎÃæ¤ËÁ÷¤ë¤³¤È¡×
¤ÈÆɤߤޤ¹¡£
<P>ÀßÄê¤Ïξü¤ÇÂФˤʤëÅÀ¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£¥È¥ó¥Í¥ë¥Ç¥Ð¥¤¥¹¤Ï¡¢·ÐÏ©¤ò»Ø
Äꤹ¤ë¤¿¤á¤Ë¼õ¤±¼è¤Ã¤¿¥Ç¡¼¥¿¥°¥é¥à¤òÆþ¤ì¤¿ IP ¥Ç¡¼¥¿¥°¥é¥à¤Î<EM>½ªÅÀ</EM>
¤È¤·¤Æ¡¢·ÐÏ©¤ÎÃæ¤Ç `<CODE>gw</CODE>' ¤ò»È¤¤¤Þ¤¹¡£¤½¤Î¥Þ¥·¥ó¤Ï IPIP ¥Ç¡¼¥¿¥°¥é¥à
¤Î¥«¥×¥»¥ë²½²ò½ü¤ÎÊýË¡¤òÃΤäƤ¤¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
¤Ä¤Þ¤ê¡¢¥È¥ó¥Í¥ë¥Ç¥Ð¥¤¥¹¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
<P>
<H3>¥È¥ó¥Í¥ê¥ó¥°¤ò¹Ô¤¦¥Û¥¹¥È¤ÎÀßÄê</H3>

<P>¥Í¥Ã¥È¥ï¡¼¥¯Á´ÂΤǤޤȤá¤Æ·ÐÏ©À©¸æ¤ò¹Ô¤¦É¬ÍפϤ¢¤ê¤Þ¤»¤ó¡£Î㤨¤Ð¡¢1 ¤Ä
¤Î IP ¥¢¥É¥ì¥¹¤À¤±¤Î·ÐÏ©¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ë¤Ï¡¢¡Ö¥ê¥â¡¼
¥È¡×¤Î¥Þ¥·¥ó¤Î<CODE>tunl</CODE> ¥Ç¥Ð¥¤¥¹¤Ë¥Û¡¼¥à¤Î IP ¥¢¥É¥ì¥¹¤òÀßÄꤷ¡¢A ¦¤Ç
¤Ï¥È¥ó¥Í¥ë¥Ç¥Ð¥¤¥¹¤òÄ̤¸¤Æ¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤Î·ÐÏ©À©¸æ¤Ç¤Ï¤Ê¤¯¥Û¥¹¥È¤Î·ÐÏ©
À©¸æ(¤ª¤è¤Ó Proxy Arp)¤ò¹Ô¤¦¤À¤±¤Ç¤¹¡£¹½À®¿Þ¤òÀµ¤·¤¯½ñ¤­Ä¾¤·¤Æ¤ß¤Þ¤·¤ç
¤¦¡£º£Å٤ξì¹ç¤Ï¡¢Î¾Êý¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Ë´°Á´¤ËÀܳ¤·¡¢¤«¤Ä¥Û¥¹¥È 
`<CODE>A</CODE>' ¤¬¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¥ê¥â¡¼¥È¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Î°ìÉô¤Ç¤¢¤ë¤«¤Î¤è¤¦
¤ËÆ°ºî¤µ¤»¤¿¤¤¥Û¥¹¥È `<CODE>B</CODE>' ¤¬¤¢¤ë¤À¤±¤Ç¤¹:
<P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
 192.168.1/24

     -
     |      ppp0 =                ppp0 =
     |  aaa.bbb.ccc.ddd      fff.ggg.hhh.iii
     |
     |   /-----\                 /-----\
     |   |     |       //        |     |
     |---|  A  |------//---------|  B  |
     |   |     |     //          |     |
     |   \-----/                 \-----/
     |                      also: 192.168.1.12
     -
</PRE>
</CODE></BLOCKQUOTE>
<P>Linux ¤Ë¤è¤ë¥ë¡¼¥¿ `<CODE>A</CODE>' ¤Ï°Ê²¼¤Î¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤ÆÀßÄꤷ¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/sh
        PATH=/sbin:/usr/sbin
        mask=255.255.255.0
        remotegw=fff.ggg.hhh.iii
        #
        # Ethernet configuration
        ifconfig eth0 192.168.1.1 netmask $mask up
        route add -net 192.168.1.0 netmask $mask eth0
        #
        # ppp0 configuration (start ppp link, set default route)
        pppd
        route add default ppp0
        #
        # Tunnel device configuration
        ifconfig tunl0 192.168.1.1 up
        route add -host 192.168.1.12 gw $remotegw tunl0
        #
        # Proxy ARP for the remote host
        arp -s 192.168.1.12 xx:xx:xx:xx:xx:xx pub
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>Linux ¥Û¥¹¥È `<CODE>B</CODE>' ¤Ï°Ê²¼¤Î¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤ò»È¤Ã¤ÆÀßÄꤷ¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/sh
        PATH=/sbin:/usr/sbin
        mask=255.255.255.0
        remotegw=aaa.bbb.ccc.ddd 
        #
        # ppp0 configuration (start ppp link, set default route)
        pppd
        route add default ppp0
        #
        # Tunnel device configuration
        ifconfig tunl0 192.168.1.12 up
        route add -net 192.168.1.0 netmask $mask gw $remotegwtunl0
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¤³¤Î¤è¤¦¤ÊÀßÄê¤Ï¡¢¥â¥Ð¥¤¥ë IP ¤ò¹Í¤¨¤ë¤È¤è¤ê¤Ï¤Ã¤­¤ê¤·¤Þ¤¹¡£
¥â¥Ð¥¤¥ë IP ¤Ç¤Ï¡¢1 ¤Ä¤Î¥Û¥¹¥È¤¬¥¤¥ó¥¿¡¼¥Í¥Ã¥È¾å¤Ç¤¢¤Á¤³¤Á¤Ë°ÜÆ°¤·¤Ä¤Ä¡¢
¤½¤Î´Ö¤º¤Ã¤È 1 ¤Ä¤Î IP ¥¢¥É¥ì¥¹¤ò»È¤¤Â³¤±¤é¤ì¤ë¤ÈÊØÍø¤Ç¤¹¡£¼ÂºÝ¤Î
¥â¥Ð¥¤¥ë IP ¤Î°·¤¤Êý¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥â¥Ð¥¤¥ë IP ¤ÎÀá¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>
<H2><A NAME="ss6.9">6.9 IP ¥Þ¥¹¥«¥ì¡¼¥É(IP Masquerade)</A>
</H2>

<P>¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤¹¤ë¤¿¤á¤Ë¥À¥¤¥¢¥ë¥¢¥Ã¥×Àܳ¤ò»È¤Ã¤Æ¤¤¤ë¿Í¤â¤¿¤¯¤µ
¤ó¤¤¤ë¤³¤È¤Ç¤·¤ç¤¦¡£¤³¤¦¤¤¤Ã¤¿Àܳ¤òÍѤ¤¤Æ¤¤¤ë¤Û¤È¤ó¤É¤Î¿Í¤Ï¡¢
ISP ¤«¤é IP ¥¢¥É¥ì¥¹¤ò 1 ¤Ä¤·¤«¤â¤é¤¨¤Þ¤»¤ó¡£ 1 Âæ¤Î¥Û¥¹¥È¤¬´°Á´
¤Ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤Ë¤Ï¡¢ÉáÄÌ¤Ï IP ¥¢¥É¥ì¥¹¤¬ 1 ¤Ä¤¢¤ì¤Ð½½Ê¬¤À¤«¤é¤Ç
¤¹¡£IP ¥Þ¥¹¥«¥ì¡¼¥É(IP Masquerade)¤È¤¤¤¦¤Î¤Ï¡¢1 ¤Ä¤Î IP ¥¢¥É¥ì¥¹¤òÊ£¿ô
¤Î¥³¥ó¥Ô¥å¡¼¥¿¤Ç»È¤¦¤¿¤á¤Î¤¦¤Þ¤¤»Å³Ý¤±¤Ç¤¹¡£IP ¥Þ¥¹¥«¥ì¡¼¥É¤ò»È¤¨¤Ð¡¢
¡Ö¥Þ¥¹¥«¥ì¡¼¥É(masquerade, ÊÑÁõ)¡×¤È¤¤¤¦¸ÀÍÕ¤ÎÄ̤ꡢ¾¤Î¥Û¥¹¥È¤ò
¥À¥¤¥¢¥ë¥¢¥Ã¥×Àܳ¤·¤Æ¤¤¤ë¥Þ¥·¥ó¤Ë¸«¤»¤«¤±¤Æ IP ¥¢¥É¥ì¥¹¤ò¶¦Í­¤Ç¤­¤Þ¤¹¡£
¤¿¤À¤·Ãí°ÕÅÀ¤â¾¯¤·¤¢¤Ã¤Æ¡¢¥Þ¥¹¥«¥ì¡¼¥Éµ¡Ç½¤Ï¤Û¤Ü³Î¼Â¤ËÊÒÊý¸þ¤ÎÄÌ¿®¤Ç¤·
¤«Æ°ºî¤·¤Þ¤»¤ó¡£¤Ä¤Þ¤ê¡¢¥Þ¥¹¥«¥ì¡¼¥É¤µ¤ì¤Æ¤¤¤ë¥Û¥¹¥È¤Ï¼«Ê¬¤«¤é¤ÎÀܳ¤Ï
¹Ô¤¨¤Þ¤¹¤¬¡¢¥ê¥â¡¼¥È¥Û¥¹¥È¤«¤é¤ÎÀܳ¤ò¼õ¤±ÉÕ¤±¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£
¤·¤¿¤¬¤Ã¤Æ¡¢<EM>talk</EM> Åù¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥µ¡¼¥Ó¥¹¤ÏÆ°ºî¤·¤Þ¤»¤ó¤·¡¢
<EM>ftp</EM> Åù¤Î¥µ¡¼¥Ó¥¹¤Ï¥Ñ¥Ã¥·¥Ö(PASV)¥â¡¼¥É¤ÇÆ°ºî¤¹¤ë¤è¤¦¤ËÀßÄꤷ¤Ê¤±
¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¹¬±¿¤Ê¤³¤È¤Ë¡¢<EM>telnet</EM>, WWW,  <EM>irc</EM> ¤ò´Þ¤àÂçÉôʬ
¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥µ¡¼¥Ó¥¹¤Ï¤¦¤Þ¤¯Æ°ºî¤·¤Þ¤¹¡£
<P>
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
        Code maturity level options  --->
            [*] Prompt for development and/or incomplete code/drivers
        Networking options  --->
            [*] Network firewalls
            ....
            [*] TCP/IP networking
            [*] IP: forwarding/gatewaying
            ....
            [*] IP: masquerading (EXPERIMENTAL)
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>ÉáÄ̤ξì¹ç¡¢¤¢¤Ê¤¿¤Î Linux ¥Þ¥·¥ó¤Ë¤Ï slip ¤« PPP ¥À¥¤¥¢¥ë¥¢¥Ã¥×
Àܳµ¡Ç½¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤ë»ö¤Ç¤·¤ç¤¦ (¤¢¤¿¤«¤â¥¹¥¿¥ó¥É¥¢¥í¥ó¤Î¥Þ¥·¥ó¤Ç
¤¢¤ë¤«¤Î¤è¤¦¤Ë)¡£¤µ¤é¤Ë¡¢¤½¤Î¥Þ¥·¥ó¤Ë¤ÏÊ̤Υͥåȥ¥¯¥Ç¥Ð¥¤¥¹ (¿ʬ
¥¤¡¼¥µ¥Í¥Ã¥È) ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Æ¡¢¥Í¥Ã¥È¥ï¡¼¥¯¤¬°ì¤Ä³ä¤ê¿¶¤é¤ì¤Æ¤¤¤ë¤³¤È¤Ë
¤Ê¤Ã¤Æ¤¤¤ë¤Ç¤·¤ç¤¦¡£
¥Þ¥¹¥«¥ì¡¼¥É·Ðͳ¤ÇÀܳ¤¹¤ë¥Û¥¹¥È¤Ï¤³¤Î 
2 ¤Ä¤á¤Î¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ë¤¢¤ê¤Þ¤¹¡£¥¤¡¼¥µ¥Í¥Ã¥È¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ë¤¢¤ë³Æ
¥Þ¥·¥ó¤Î¥Ç¥Õ¥©¥ë¥È¤Î·ÐÏ©¤Ë¤Ï¡¢ IP ¥Þ¥¹¥«¥ì¡¼¥É¤òÁȤ߹þ¤ó¤Ç¥¤¥ó¥¿¡¼¥Í¥Ã¥È
¤È¤Î¥²¡¼¥È¥¦¥§¥¤¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡¢¤³¤Î Linux ¥Þ¥·¥ó¤ò»ØÄꤷ¤Þ¤¹¡£
<P>¤è¤¯¤¢¤ë IP ¥Þ¥¹¥«¥ì¡¼¥É¤ÎÀßÄê¤Ï²¼¿Þ¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
-                                   -
 \                                  | 192.168.1.0
  \                                 |   /255.255.255.0
   \                 ---------      |
    |                | Linux | .1.1 |
NET =================| masq  |------|
    |    PPP/slip    | router|      |  --------
   /                 ---------      |--| host |
  /                                 |  |      |
 /                                  |  --------
-                                   -
</PRE>
</CODE></BLOCKQUOTE>
<P><EM>IPFWADM ¤ò»È¤Ã¤¿ IP ¥Þ¥¹¥«¥ì¡¼¥É</EM>
<P>¤³¤ÎÀßÄê¤ò¹Ô¤¦¤¿¤áºÇ¤âŬÀڤʥ³¥Þ¥ó¥É¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        # Network route for ethernet
        route add -net 192.168.1.0 netmask 255.255.255.0 eth0
        #
        # Default route to the rest of the internet.
        route add default ppp0
        #
        # Cause all hosts on the 192.168.1/24 network to be masqueraded.
        ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0 
        
</PRE>
</CODE></BLOCKQUOTE>
<P><EM>ipchains ¤ò»È¤Ã¤¿ IP ¥Þ¥¹¥«¥ì¡¼¥É</EM>
<P>¤³¤ì¤Ï ipfwadm ¤ò»È¤¦¾ì¹ç¤È»÷¤Æ¤¤¤Þ¤¹¤¬¡¢¥³¥Þ¥ó¥É¤Î¹½Â¤¤¬ÊѤï¤Ã¤Æ
¤¤¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        # Network route for ethernet
        route add -net 192.168.1.0 netmask 255.255.255.0 eth0
        #
        # Default route to the rest of the internet.
        route add default ppp0
        #
        # Cause all hosts on the 192.168.1/24 network to be masqueraded.
        ipchains -A forward -s 192.168.1.0/24 -j MASQ
        
</PRE>
</CODE></BLOCKQUOTE>
<P>IP ¥Þ¥¹¥«¥ì¡¼¥Éµ¡Ç½¤Î¾Ü¤·¤¤ÀâÌÀ¤Ï
<A HREF="http://www.hwy401.com/achau/ipmasq/">IP Masquerade Resource Page</A>
¤Ë¤¢¤ê¤Þ¤¹¡£
¤Þ¤¿¡¢IP ¥Þ¥¹¥«¥ì¡¼¥É¤Ë´Ø¤¹¤ë<EM>Èó¾ï¤Ë</EM>¾Ü¤·¤¤ÀâÌÀ¤È¤·¤Æ¡¢
``IP-Masquerade mini-HOWTO'' ¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Îʸ½ñ¤Ë¤Ï¡¢Linux ¤ò»È¤Ã¤¿ 
IP ¥Þ¥¹¥«¥ì¡¼¥É¥µ¡¼¥Ð¤È¾¤Î OS ¤òÁȤ߹ç¤ï¤»¤Æ»È¤¦¤¿¤á¤ÎÀßÄê¤âºÜ¤Ã¤Æ¤¤
¤Þ¤¹¡£
<P>(Ãí: ¾åµ­ uri ¤Ï 2000/12 ¸½ºßÅþãÉÔǽ¤Ê¤è¤¦¤Ç¤¹¡£
Âå¤ê¤Ë
<A HREF="http://ipmasq.cjb.net/">Linux IP Masquerade Resource</A>
¤ò¤´Í÷¤¯¤À¤µ¤¤¡£)
<P>
<P>
<H2><A NAME="ss6.10">6.10 IP Æ©²á¥×¥í¥­¥·(IP Transparent Proxy)</A>
</H2>

<P>IP transparent proxy µ¡Ç½¤ò»È¤¨¤Ð¡¢Ê̤Υޥ·¥ó¤Ø¤Î¥µ¡¼¥Ó¥¹¥ê¥¯¥¨¥¹¥È¤ä
¥µ¡¼¥Ð¤Ø¤Î¥¢¥¯¥»¥¹¤ò¤³¤Î¥Þ¥·¥ó¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Îµ¡
ǽ¤Ï¡¢Linux ¥Þ¥·¥ó¤ò¥ë¡¼¥¿·ó¥×¥í¥­¥·¥µ¡¼¥Ð¤È¤·¤Æ»È¤Ã¤Æ¤¤¤ë¾ì¹ç¤ËÊØÍø¤Ç¡¢
³°Éô¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤ØÍ׵ᤵ¤ì¤¿¥ê¥¯¥¨¥¹¥È¤òÁ´¤Æ¥í¡¼¥«¥ë¤Î¥×¥í¥­¥·¥µ¡¼¥Ð
¤Ç½èÍý¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
<P>
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
        Code maturity level options  --->
                [*] Prompt for development and/or incomplete code/drivers
        Networking options  --->
                [*] Network firewalls
                ....
                [*] TCP/IP networking
                ....
                [*] IP: firewalling
                ....
                [*] IP: transparent proxy support (EXPERIMENTAL)
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>Æ©²á¥×¥í¥­¥·µ¡Ç½¤Ï <EM>ipfwadm</EM> ¥³¥Þ¥ó¥É¤ÇÀßÄꤷ¤Þ¤¹¡£
<P>ÌòΩ¤Á¤½¤¦¤ÊÀßÄêÎã¤ò°Ê²¼¤Ë¼¨¤·¤Æ¤ª¤­¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# ipfwadm -I -a accept -D 0/0 telnet -r 2323
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¤³¤ÎÎã¤ò¼Â¹Ô¤·¤¿¾ì¹ç¡¢Ç¤°Õ¤Î¥Û¥¹¥È¤Î <CODE>telnet</CODE>(23 ÈÖ)¥Ý¡¼¥È¤ËÀܳ
¤·¤è¤¦¤È¤¹¤ë¤È¡¢Æ©²á¥×¥í¥­¥·¥Û¥¹¥È¤Î 2323 È֥ݡ¼¥È¤Ë¥ê¥À¥¤¥ì¥¯¥È¤µ¤ì¤Þ¤¹¡£
¤³¤Î¥Ý¡¼¥È¤Ç¥µ¡¼¥Ó¥¹¤ò¼Â¹Ô¤¹¤ì¤Ð¡¢telnet Àܳ¤òžÁ÷¤·¤¿¤ê¥í¥°¤ò»Ä¤¹Åù¡¢
ɬÍפ˱þ¤¸¤¿Æ°ºî¤ò¤µ¤»¤é¤ì¤Þ¤¹¡£
<P>¤µ¤é¤ËÌÌÇò¤¤Îã¤È¤·¤Æ¡¢Á´¤Æ¤Î <CODE>http</CODE> ¥È¥é¥Õ¥£¥Ã¥¯¤ò¥í¡¼¥«¥ë¤Î
¥­¥ã¥Ã¥·¥å¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£¤·¤«¤·¡¢¥×¥í¥­¥·¥µ¡¼¥Ð¤¬»È
¤¦¥×¥í¥È¥³¥ë¤Ï¥Í¥¤¥Æ¥£¥Ö¤Î http: ¤È¤Ï°Û¤Ê¤ê¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢http ¥¯¥é¥¤¥¢¥ó¥È
¤Ï <CODE>www.server.com:80</CODE> ¤ËÀܳ¤·¤Æ <CODE>/path/page</CODE> ¤òÍ׵ᤷ¤Þ¤¹¤¬¡¢
¥í¡¼¥«¥ë¥­¥ã¥Ã¥·¥å¤ËÀܳ¤·¤¿¾ì¹ç¤Ï <CODE>proxy.local.domain:8080</CODE> ¤ËÀܳ
¤·¤Æ <CODE>www.server.com/path/page</CODE> ¤òÍ׵ᤷ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
<P><CODE>http</CODE> ¥ê¥¯¥¨¥¹¥È¤Ë¥í¡¼¥«¥ë¥×¥í¥­¥·¤Î¥Õ¥£¥ë¥¿¤ò¤«¤±¤ë¤Ë¤Ï¡¢
<CODE>transproxy</CODE> ¤È¸Æ¤Ð¤ì¤ë¾®¤µ¤Ê¥µ¡¼¥Ð(WWW ¤ÇÆþ¼ê¤Ç¤­¤Þ¤¹)¤ò´Ö¤ËÃÖ¤¤¤Æ¡¢
¥×¥í¥È¥³¥ë¤ò°ìÃפµ¤»¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£<CODE>transproxy</CODE> ¤ò 
8081 È֥ݡ¼¥È¤ÇÆ°ºî¤µ¤»¤ë¤Ë¤Ï¡¢°Ê²¼¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        root# ipfwadm -I -a accept -D 0/0 80 -r 8081
        
</PRE>
</CODE></BLOCKQUOTE>
<P>¤³¤¦¤¹¤ë¤È¡¢<CODE>transproxy</CODE> ¤Ï³°Éô¥µ¡¼¥Ð¤Ë¥¢¥¯¥»¥¹¤·¤è¤¦¤È¤¹¤ëÁ´¤Æ¤ÎÀܳ¤ò
¼õ¤±¼è¤ê¡¢¥×¥í¥È¥³¥ë¤ÎÁê°ãÅÀ¤òľ¤·¤¿¸å¤Ë¡¢¤³¤ì¤ò¥í¡¼¥«¥ë¤Î¥×¥í¥­¥·¤ËÅÏ
¤·¤Þ¤¹¡£
<P>
<P>
<H2><A NAME="ss6.11">6.11 IPv6</A>
</H2>

<P>¤ä¤Ã¤È IP ¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤Ä¤¤¤ÆÍý²ò¤·»Ï¤á¤¿¤È¤³¤í¤À¤È¤¤¤¦¤Î¤Ë¡¢¥ë¡¼¥ë¤¬
ÊѤäƤ·¤Þ¤¦¤Ê¤ó¤Æ¡Ä¡¢¤È»×¤ï¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£IPv6 ¤È¤Ï Internet
Protocol Version 6 ¤Î¾Êά·Á¤Ç¤¹¡£IPv6 ¤Ï¡¢¸½ºß¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥³¥ß¥å¥Ë¥Æ¥£
¤¬Ä¾Ì̤·¤Æ¤¤¤ë IP ¥¢¥É¥ì¥¹¤Î¸Ï³éÌäÂê¤ËÂбþ¤¹¤ë¤³¤È¤ò¼çÌÜŪ¤Ë³«È¯¤µ¤ì¤Æ
¤¤¤Þ¤¹¡£IPv6 ¤Î¥¢¥É¥ì¥¹¤Ï 16 ¥Ð¥¤¥ÈĹ(128 ¥Ó¥Ã¥È)¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤½¤ì°Ê
³°¤Ë¤â¡¢IPv6 ¤Ç¤Ï¼ç¤È¤·¤Æñ½ã²½¤Î¤¿¤á¤Î¤µ¤Þ¤¶¤Þ¤ÊÊѹ¹¤¬»Ü¤µ¤ì¤Æ¡¢´û¸
¤Î IPv4 ¥Í¥Ã¥È¥ï¡¼¥¯¤è¤ê¤â´ÉÍý¤·¤ä¤¹¤¤¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
<P>Linux <CODE>2.2.*</CODE>¥·¥ê¡¼¥º¤Ë¤Ï¡¢´û¤Ë IPv6 ¤Î¼ÂÁõ¤¬Æ°ºî¤·¤Æ¤¤¤Þ¤¹¤¬¡¢
¤Þ¤À´°Á´¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
<P>¤³¤Î¼¡À¤Âå¤Î¥¤¥ó¥¿¡¼¥Í¥Ã¥Èµ»½Ñ¤ò»î¤·¤Æ¤ß¤¿¤¤¾ì¹ç¤äɬÍפʾì¹ç¤Ï¡¢
<A HREF="http://www.terra.net/ipv6/">www.terra.net</A>
¤«¤éÆþ¼ê¤Ç¤­¤ë IPv6-FAQ ¤ò¤Þ¤ºÆɤó¤Ç¤ß¤Þ¤·¤ç¤¦¡£
<P>
<H2><A NAME="ss6.12">6.12 ¥â¥Ð¥¤¥ë IP(Mobile IP)</A>
</H2>

<P>¡ÖIP ¤Î²ÄÈÂÀ­(IP mobility)¡×¤È¤Ï¡¢¤¢¤ë¾ì½ê¤Ç¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤ËÀܳ¤·¤Æ¤¤
¤ë¥Û¥¹¥È¤¬¡¢Ê̤ξì½ê¤Ë°Ü¤Ã¤Æ¤â IP ¥¢¥É¥ì¥¹¤òÊѹ¹¤»¤º¤ËÀܳ¤Ç¤­¤¿¤ê¡¢ÀÜ
³¤òÀڤ餺¤Ë¾ì½ê¤ò°ÜÆ°¤Ç¤­¤ë¤³¤È¤Ç¤¹¡£Ä̾IP ¥¢¥É¥ì¥¹¤ò³ä¤êÅö¤Æ¤é¤ì
¤Æ¤¤¤ë¥Û¥¹¥È¤Ï¡¢Àܳ¾ì½ê¤òÊѹ¹¤¹¤ì¤Ð IP ¥¢¥É¥ì¥¹¤âÊѹ¹¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ
¤»¤ó¡£IP mobility µ¡Ç½¤ò»È¤¨¤Ð¡¢¥Ý¡¼¥¿¥Ö¥ë¥Þ¥·¥ó¤Ë¤â·è¤Þ¤Ã¤¿ IP ¥¢¥É¥ì
¥¹¤ò³ä¤êÅö¤Æ¡¢¼«Æ°¥ë¡¼¥Æ¥£¥ó¥°µ¡Ç½¤ÈIP ¥«¥×¥»¥ë²½(¥È¥ó¥Í¥ê¥ó¥°)µ¡Ç½¤ò
»È¤¤¡¢¥Ý¡¼¥¿¥Ö¥ë¥Þ¥·¥ó°¸¤Î¥Ç¡¼¥¿¥°¥é¥à¤ò¡¢¤½¤Î¥Þ¥·¥ó¤¬¸½ºß¼ÂºÝ¤Ë»È¤Ã¤Æ
¤¤¤ë IP ¥¢¥É¥ì¥¹¤ËÁ÷¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
<P>Linux ÍÑ¤Ë IP mobility ¥Ä¡¼¥ë°ì¼°¤ò³«È¯¤·¤è¤¦¤È¤¤¤¦¥×¥í¥¸¥§¥¯¥È¤¬¿Ê¹Ô
Ãæ¤Ç¤¹¡£¥×¥í¥¸¥§¥¯¥È¤Î¿Ê¹Ô¾õ¶·¤È¥Ä¡¼¥ë¤Ï
<A HREF="http://anchor.cs.binghamton.edu/~mobileip/">Linux Mobile IP Home Page</A>
¤«¤éÆþ¼ê¤Ç¤­¤Þ¤¹¡£
<P>
<H2><A NAME="ss6.13">6.13 ¥Þ¥ë¥Á¥­¥ã¥¹¥È</A>
</H2>

<P>Ä̾TCP/IP ¤ÏÀܳÀè¤Î¥Þ¥·¥ó¤ò»ØÄꤷ¤¿°ìÂаì¤ÎÀܳ·ÁÂÖ¤ò¼è¤ê¤Þ¤¹¤¬¡¢
IP ¥Þ¥ë¥Á¥­¥ã¥¹¥Èµ¡Ç½¤ò»È¤¨¤Ð¡¢°Û¤Ê¤ë IP ¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ë¤¢¤ëǤ°Õ¤Î¿ô
¤Î¥Û¥¹¥È¤Ø¡¢Æ±»þ¤Ë IP ¥Ç¡¼¥¿¥°¥é¥à¤òÁ÷¤ë¤³¤È¤¬²Äǽ¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤Îµ¡Ç½
¤Ï¡¢¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÁ´ÂΤز»À¼¤ä¥Ó¥Ç¥ª¤ÎÁǺà¤ò¡ÖÊüÁ÷¡×¤¹¤ë¤Ê¤É¡¢
¤µ¤Þ¤¶¤Þ¤Ê¿·¤·¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¤¿¤á¤Ë³«È¯¤µ¤ì¤Þ¤·¤¿¡£
<P><B>¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó</B>:
<BLOCKQUOTE><CODE>
<PRE>
Networking options  --->
        [*] TCP/IP networking
        ....
        [*] IP: multicasting
</PRE>
</CODE></BLOCKQUOTE>
<P>IP ¥Þ¥ë¥Á¥­¥ã¥¹¥È¤ò»È¤¦¤Ë¤Ï¡¢¥Ä¡¼¥ë°ì¼°¤È¿¾¯¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀßÄ꤬ɬ
ÍפǤ¹¡£Linux ¤Î¥Þ¥ë¥Á¥­¥ã¥¹¥ÈÂбþ¤Ë´Ø¤¹¤ë¾Ü¤·¤¤¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï
<A HREF="Multicast-HOWTO.html">Multicast-HOWTO</A>
¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
<P>
<H2><A NAME="ss6.14">6.14 NAT - ¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹ÊÑ´¹(Network Address Translation)</A>
</H2>

<P>IP ¥Í¥Ã¥È¥ï¡¼¥¯¥¢¥É¥ì¥¹ÊÑ´¹µ¡Ç½(NAT)¤Ï¡¢Linux ¤Î IP ¥Þ¥¹¥«¥ì¡¼¥Éµ¡Ç½¤Î
·»µ®Ê¬¤¬É¸½à²½¤µ¤ì¤¿¤â¤Î¡¢¤È»×¤Ã¤Æ¤À¤¤¤¿¤¤¤«¤Þ¤¤¤Þ¤»¤ó¡£NAT ¤Ï RFC-1631 
¤Ç¾Ü¤·¤¯»ÅÍͤ¬·è¤á¤é¤ì¤Æ¤¤¤Þ¤¹(RFC ʸ½ñ¤Ï¤ª¶á¤¯¤Î RFC ¥¢¡¼¥«¥¤¥Ö¤«¤éÆþ
¼ê¤·¤Æ¤¯¤À¤µ¤¤)¡£NAT ¤Ë¤Ç¤­¤Æ IP ¥Þ¥¹¥«¥ì¡¼¥É¤Ë¤Ï¤Ç¤­¤Ê¤¤µ¡Ç½¤¬¤¢¤ë¤Î
¤Ç¡¢²ñ¼Òµ¬ÌϤΥե¡¥¤¥¢¥¦¥©¡¼¥ë¤Î·ÐÏ©À߷פäÂ絬ÌϤÊÀßÈ÷¤ÇÍѤ¤¤ë¤Ë¤Ï NAT 
¤ÎÊý¤¬¤º¤Ã¤ÈŬÀڤǤ¹¡£
<P>Linux 2.0.29 ÍѤΠNAT ¤Î¥¢¥ë¥Õ¥¡ÈǤμÂÁõ¤Ï Michael.Hasenstein
<CODE>Michael.Hasenstein@informatik.tu-chemnitz.de</CODE> ¤¬³«È¯¤·¤Þ¤·¤¿¡£
Michaels ¤¬ºîÀ®¤·¤¿Ê¸½ñ¤È¼ÂÁõ¤Ï°Ê²¼¤Î¾ì½ê¤«¤éÆþ¼ê¤Ç¤­¤Þ¤¹:
<P>
<A HREF="http://www.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html">Linux IP Network Address Web Page</A><P>¿·¤·¤¤ Linux 2.2.x ¤Ç¤â¡¢·ÐÏ©À©¸æ¥¢¥ë¥´¥ê¥º¥à¤Ë NAT µ¡Ç½¤Î°ìÉô¤¬Æþ¤Ã¤Æ
¤¤¤Þ¤¹¡£
<P>
<H2><A NAME="ss6.15">6.15 Traffic Shaper - µö²Ä¤¹¤ëÂÓ°èÉý¤ÎÊѹ¹</A>
</H2>

<P>traffic shaper ¤Ï¡¢¥æ¡¼¥¶¤¬ÄêµÁ¤·¤¿¤è¤¦¤Ë¥È¥é¥Õ¥£¥Ã¥¯¤òÀ©¸Â¤¹¤ë¥¤¥ó
¥¿¥Õ¥§¡¼¥¹¥Ç¥Ð¥¤¥¹¤ò¿·¤·¤¯ºîÀ®¤¹¤ë¥É¥é¥¤¥Ð¤Ç¤¹¡£¤³¤Î¥Ç¥Ð¥¤¥¹¤Ï¡¢¼ÂºÝ¤Î
Á÷¿®¤ò¹Ô¤¦ÊªÍýŪ¤Ê¥Í¥Ã¥È¥ï¡¼¥¯¥Ç¥Ð¥¤¥¹¤Ë°Í¸¤·¤Þ¤¹¡£¤Þ¤¿¡¢¥Í¥Ã¥È¥ï¡¼¥¯
¥È¥é¥Õ¥£¥Ã¥¯¤ËÂФ·¤Æ¤ÏÁ÷¿®ÍѤΠrouted ¤È¤·¤Æ»È¤¨¤Þ¤¹¡£
<P>
<P>traffic shaper ¤Ï Linux 2.1.15 ¤ÇƳÆþ¤µ¤ì¡¢Linux 2.0.36 ¤Ë
¥Ð¥Ã¥¯¥Ý¡¼¥È(ÌõÃí: ³«È¯ÈÇ¥«¡¼¥Í¥ë¤Îµ¡Ç½¤ò°ÂÄêÈÇ¥«¡¼¥Í¥ë¤Ë°Ü¿¢¤¹¤ë¤³¤È)
¤µ¤ì¤Þ¤·¤¿(traffic shaper ¤Ï¡¢Alan Cox ¤¬ÇÛÉÛ¤·¤Æ¤¤¤ë
<CODE>2.0.36-pre-patch-2</CODE> ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£Alan Cox ¤Ï Linux 2.0 ÍѤÎ
shaper ¥Ç¥Ð¥¤¥¹¤Îºî¼Ô¤Ç¤¢¤ê¥á¥ó¥Æ¥Ê¤Ç¤¹)¡£
<P>
<P>traffic shaper ¤Ï¥â¥¸¥å¡¼¥ë¤È¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
¤³¤Î¥Ç¥Ð¥¤¥¹¤Ï <EM>shapecfg</EM> ¥³¥Þ¥ó¥É¤ò°Ê²¼¤Î¤è¤¦¤Ë»È¤Ã¤ÆÀßÄꤷ¤Þ¤¹:
<P>
<BLOCKQUOTE><CODE>
<PRE>
        shapecfg attach shaper0 eth1
        shapecfg speed shaper0 64000
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>shaper ¥Ç¥Ð¥¤¥¹¤ÏÁ÷¿®¤¹¤ë¥È¥é¥Õ¥£¥Ã¥¯¤ÎÂÓ°èÉý¤ÎÀ©¸æ¤·¤«¤Ç¤­¤Þ¤»¤ó¡£
¤È¤¤¤¦¤Î¤â¡¢¥Ñ¥±¥Ã¥È¤Ï·Ðϩɽ¤Ë½¾¤Ã¤Æ shaper ¥Ç¥Ð¥¤¥¹·Ðͳ¤ÇÁ÷¿®¤µ¤ì¤ë¤«
¤é¤Ç¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢¡Ö»ÏÅÀ¥¢¥É¥ì¥¹¤ò»È¤Ã¤¿·ÐÏ©À©¸æ¡×µ¡Ç½¤òÍøÍѤ¹¤ì¤Ð¡¢
Linux ¥ë¡¼¥¿¤ò»È¤Ã¤Æ¤¤¤ëÆÃÄê¤Î¥Û¥¹¥È¤ÎÁ´ÂΤÎÂÓ°èÉý¤òÀ©¸Â¤Ç¤­¤Þ¤¹¡£
<P>
<P>Linux 2.2 ¤ÏºÇ½é¤«¤é¤³¤Î¤è¤¦¤Ê·ÐÏ©À©¸æ¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹¡£Linux 2.0 
¤Ç¤³¤Îµ¡Ç½¤¬É¬Íפʤé¤Ð Mike McLagan ¤Ë¤è¤ë¥Ñ¥Ã¥Á¤òÄ´¤Ù¤Æ¤¯¤À¤µ¤¤¡£
¤³¤Î¥Ñ¥Ã¥Á¤Ï <CODE>ftp.invlogic.com</CODE> ¤Ë¤¢¤ê¤Þ¤¹¡£shaper ¥Ç¥Ð¥¤¥¹¤Ë´Ø¤¹¤ë
¤Î¾Ü¤·¤¤¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢<CODE>Documentation</CODE>networking/shaper.txt/ ¤ò
¸«¤Æ¤¯¤À¤µ¤¤¡£
<P>
<P>¼õ¿®¤¹¤ë¥Ñ¥±¥Ã¥È¤Î(»î¸³Åª¤Ê)Ä´À°¤ò»î¤·¤Æ¤ß¤¿¤±¤ì¤Ð¡¢
<CODE>rshaper-1.01</CODE> ¤ò»î¤¹¤È¤è¤¤¤Ç¤·¤ç¤¦(¤µ¤é¤Ë¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤¬¤¢
¤ë¤«¤â¤·¤ì¤Þ¤»¤ó)¡£¤³¤ì¤Ï
<A HREF="ftp://ftp.systemy.it/pub/develop">ftp.systemy.it</A>
¤«¤éÆþ¼ê¤Ç¤­¤Þ¤¹¡£
<P>
<H2><A NAME="ss6.16">6.16 Linux 2.2 ¤Ë¤ª¤±¤ë·ÐÏ©À©¸æ</A>
</H2>

<P>ºÇ¿·ÈǤΠLinux ¤Ç¤¢¤ë¥Ð¡¼¥¸¥ç¥ó 2.2 ¤Ç¤Ï¡¢·ÐÏ©À©¸æ¤Î¥Ý¥ê¥·¡¼¤ÏÈó¾ï¤Ë½À
Æð¤ËÀßÄê¤Ç¤­¤Þ¤¹¡£¿½¤·Ìõ¤¢¤ê¤Þ¤»¤ó¤¬¡¢²òÀâ¤Ë¤Ä¤¤¤Æ¤ÏËÜʸ½ñ¤Î¼¡¤ÎÈǤòÂÔ
¤Ä¤«¡¢¥«¡¼¥Í¥ë¤Î¥½¡¼¥¹¤òÆɤफ¤·¤Æ¤¯¤À¤µ¤¤¡£
<P>
<P>
<HR>
<A HREF="NET3-4-HOWTO-7.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="NET3-4-HOWTO-5.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="NET3-4-HOWTO.html#toc6">Ìܼ¡¤Ø</A>
</BODY>
</HTML>