This file is indexed.

/usr/share/doc/HOWTO/ja-html/NAT-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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>Linux 2.4 NAT HOWTO: $B2?$K(B NAT $B$r9T$&$+$r@)8f$9$k(B</TITLE>
 <LINK HREF="NAT-HOWTO-6.html" REL=next>
 <LINK HREF="NAT-HOWTO-4.html" REL=previous>
 <LINK HREF="NAT-HOWTO.html#toc5" REL=contents>
</HEAD>
<BODY>
<A HREF="NAT-HOWTO-6.html">$B<!$N%Z!<%8(B</A>
<A HREF="NAT-HOWTO-4.html">$BA0$N%Z!<%8(B</A>
<A HREF="NAT-HOWTO.html#toc5">$BL\<!$X(B</A>
<HR>
<H2><A NAME="s5">5. $B2?$K(B NAT $B$r9T$&$+$r@)8f$9$k(B</A></H2>

<P>NAT $B$r9T$&$K$O!"$I$N%3%M%/%7%g%s$KJQ49$r$+$1!"$I$N$h$&$KJQ49$r9T$&$+$K$D$$$F(B
$B%+!<%M%k$K;X<($9$k(B NAT $B%k!<%k$r$D$/$kI,MW$,$"$j$^$9!#$3$N9T$&$?$a!"$H$F$b(B
$BM;DL$,Mx$/(B <CODE>iptables</CODE> $B%D!<%k$rMxMQ$7!"(B`-t nat' $B%*%W%7%g%s$r;XDj(B
$B$9$k$3$H$G!"(BNAT $B%F!<%V%k$rJQ99$9$k$h$&;X<($7$^$9!#(B
<P>
<P>NAT $B%k!<%k$N%F!<%V%k$O!"(B`chains' $B$H8F$P$l$k;0<oN`$N%j%9%H$+$i$J$j$^$9!#(B
$B$$$:$l$N%k!<%k$K$D$$$F$b!"$I$l$+$,E,9g$9$k$^$G=g$KD4$Y$i$l$^$9!#Fs<oN`$N(B
chain $B$K$O!"(BPREROUTING$B!J%Q%1%C%H$r<u?.$9$k$?$S$K!"08@h(B NAT $B$r9T$&$N$KMxMQ!K!"(B
$B$=$7$F(B POSTROUTING$B!J%Q%1%C%H$rAw?.$9$k$?$S$K!"Aw?.85(B NAT $B$r9T$&$N$KMxMQ!K(B
$B$,$"$j$^$9!#;0HVL\$N%j%9%H(B(OUTPUT)$B$O$3$3$G$OL5;k$5$l$^$9!#(B
<P>
<P>$BKM$K$$$/$i$+$G$b%"!<%F%#%9%F%#%C%/$J:MG=$,$"$C$?$i!"2<?^$O;0<oN`$N(B chain
$B$r@bL@$9$k$b$N$K$J$k$s$G$9$,$M!'(B
<P>
<BLOCKQUOTE><CODE>
<PRE>
      _____                                     _____
     /     \                                   /     \
   PREROUTING -->[Routing ]----------------->POSTROUTING----->
     \D-NAT/     [Decision]                    \S-NAT/
                     |                            ^
                     |                            |  
                     |                            |
                     |                            |
                     |                            |
                     |                            |
                     |                            |
                     --------> Local Process ------
</PRE>
</CODE></BLOCKQUOTE>
<P>$B>e?^$N$I$N%]%$%s%H$K$*$$$F$b!"%Q%1%C%H$,DL2a$9$k$H!"4XO"$9$k%3%M%/%7%g%s(B
$B$rD4$Y$k$3$H$K$J$j$^$9!#$b$7$=$l$,?7$7$$%3%M%/%7%g%s$J$i$P!"(B
$B$=$l$K$I$&$$$&=hM}$r9T$&$+CN$k$?$a$K!"(BNAT $B%F!<%V%k$NCf$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