/usr/share/doc/HOWTO/ja-html/IPCHAINS-HOWTO-2.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 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>Linux IPCHAINS-HOWTO: $B%Q%1%C%H%U%#%k%?%j%s%0$N4pAC(B</TITLE>
<LINK HREF="IPCHAINS-HOWTO-3.html" REL=next>
<LINK HREF="IPCHAINS-HOWTO-1.html" REL=previous>
<LINK HREF="IPCHAINS-HOWTO.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="IPCHAINS-HOWTO-3.html">$B<!$N%Z!<%8(B</A>
<A HREF="IPCHAINS-HOWTO-1.html">$BA0$N%Z!<%8(B</A>
<A HREF="IPCHAINS-HOWTO.html#toc2">$BL\<!$X(B</A>
<HR>
<H2><A NAME="s2">2.</A> <A HREF="IPCHAINS-HOWTO.html#toc2">$B%Q%1%C%H%U%#%k%?%j%s%0$N4pAC(B</A></H2>
<H2><A NAME="ss2.1">2.1</A> <A HREF="IPCHAINS-HOWTO.html#toc2.1">$B%Q%1%C%H%U%#%k%?$H$O2?$r$9$k$b$N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a$K;H$C$F$$$k$J$i!"(B $B$"$J$?$K$O!"FCDj$N%H%i%U%#%C%/$@$15v2D$7$F!"B>$N$b$N$r5v$5$J$$$h$&$K$9$k%A%c%s%9$,$"$j$^$9!#(B
$BNc$($P!"%Q%1%C%H$N%X%C%@!<$K$O$"$F@h%"%I%l%9(B $B$,4^$^$l$F$$$F!"30It%M%C%H%o!<%/$N$H$"$k=j$X8~$+$&%Q%1%C%H$r5qH]$9$k(B $B$3$H$,$G$-$^$9!#(B
$BJL$NNc$H$7$F!"(BNetscape $B$r;H$C$F(B Dilbert $B$N%"!<%+%$%V(B ($BLuCm(B: Dilbert $B$H$$$&%(%s%8%K%"$,<g?M8x$NIw;IL!2h$N%5%$%H!"$A$J$_$K(B dilbert $B$N0UL#$O(B'$B$P$+(B') $B$K%"%/%;%9$9$k>l9g$G$9!#(B
$B%Z!<%8$K$O(B doubleclick.net $B$N9-9p$,$"$j!"(B Netscape $B$O$=$l$r$$$=$$$=$H%@%&%s%m!<%I$9$k$?$a$K;d$N;~4V$rO2Hq$7$^$9!#(B
$B%Q%1%C%H%U%#%k%?!<$K(B doubleclick.net $B=jM-$N%"%I%l%9$+$i$N$I$s$J%Q%1%C%H$b5v2D$7$J$$$h$&$K;X<($9$l$PLdBj$O2r7h$7$^$9(B($B$b$C$H$$$$J}K!$,$"$j$^$9$1$l$I(B: Junkbuster ($BLuCm(B:
<A HREF="http://internet.junkbuster.com">http://internet.junkbuster.com</A> ) $B$r8+$F2<$5$$(B)$B!#(B</P>
<DT><B>$B%;%-%e%j%F%#(B:</B><DD><P>$B$"$J$?$N(B Linux $B%\%C%/%9$,%$%s%?!<%M%C%H$N:.FY$H!"Ca=x@5$7$$$"$J$?$N$9$F$-$J%M%C%H%o!<%/$N4V$K$"$kM#0l$NJ*$J$i!"$9$P$i$7$$$3$H$K!"$"$J$?$O2%$j$K$d$C$FMh$k<T$r%I%"$N$H$3$m$G@)8B$9$k$3$H$,$G$-$^$9!#(B
$BNc$($P!"$"$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(B
$B<!2s!"(B Linux $B$,%V!<%H$5$l$k:]$K!"$=$l$i$r3N<B$KLa$9$9$kJ}K!$K$D$$$F$O!"<!$N@a(B
<A HREF="#permanent">$B%U%#%k%?5,B'$r915WE*$K$9$k$K$O(B</A> $B$r;2>H$7$F2<$5$$!#(B</P>
<P><CODE>ipchains</CODE> $B$O0JA0$^$G(BIP$B%U%!%$%"%&%)!<%k$r<B8=$9$k$?$a$K;H$o$l$F$$$?(B ipfwadm $B$HCV$-49$($i$l$k$3$H$K$J$j$^$9!#(B
$BLr$KN)$D%9%/%j%W%H$N%;%C%H$,!"<!$N(B ipchains $B$N%"%I%l%9$+$iF~<j2DG=$G$9(B: </P>
<P>
<A HREF="http://netfilter.filewatcher.org/ipchains/ipchains-scripts-1.1.2.tar.gz">http://netfilter.filewatcher.org/ipchains/ipchains-scripts-1.1.2.tar.gz</A></P>
<P>$B$3$l$K$O0JA09T$o$l$F$$$?$N$HF1$8$h$&$J%9%?%$%k$G%Q%1%C%H!&%U%#%k%?%j%s%0$r9T$o$;$k$?$a$N(B <CODE>ipfwadm-wrapper</CODE> $B$H8F$P$l$F$$$k%7%'%k%9%/%j%W%H$r4^$s$G$$$^$9!#(B
$B$"$J$?$,(B <CODE>ipfwadm</CODE> (ipchains$B$HHf$Y!"$h$jCY$/$F!"0z?t!"$=$NB>$r%A%'%C%/$7$J$$Ey$N$b$N(B)$B$r;H$&%7%9%F%`$r%"%C%W%0%l!<%I$9$k<j$C<h$jAa$$J}K!$,M_$7$/$J$$8B$j!"$"$J$?$OB?J,$3$N%9%/%j%W%H$r;H$&$Y$-$G$O$J$$$G$7$g$&!#(B
$B$=$&$$$&J}$K$O$"$^$j$3$N(B HOWTO $B$bI,MW$H$O$5$l$J$$$3$H$H;W$$$^$9!#(B</P>
<P><CODE>ipfwadm</CODE> $B4XO"$N>\:Y$K$D$$$F$O!"IUO?(B:
<A HREF="IPCHAINS-HOWTO-8.html#ipfwadm-diff">ipchains $B$H(B ipfwadm $B$H$N0c$$(B</A> $B$dIUO?(B:
<A HREF="IPCHAINS-HOWTO-9.html#upgrade">`ipfwadm-wrapper'$B%9%/%j%W%H$r;H$&(B</A> $B$r$4Mw2<$5$$!#(B</P>
<H3><A NAME="permanent"></A> $B%U%#%k%?5,B'$r915WE*$K$9$k$K$O(B</H3>
<P>$B$"$J$?$N8=:_$N%U%!%$%"%&%)!<%k@_Dj$O!"%+!<%M%k$K3JG<$5$l$F!"$3$N$h$&$K:F5/F0;~$K$O<:$o$l$F$7$^$$$^$9!#(B
$B$"$J$?$N%k!<%k$r915WE*$K$9$k$?$a$K(B `ipchains-save' $B$H(B `ipchains-restore' $B%9%/%j%W%H$r;H$&$3$H$r$*4+$a$7$^$9!#(B
$B$3$l$r;H$&$K$O!"$^$:$"$J$?$N%k!<%k$r@_Dj$7$F!"<!$N$h$&$K%3%^%s%I$r<B9T$7$^$9(B(root $B$H$7$F<B9T$7$F2<$5$$(B): </P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
# ipchains-save > /etc/ipchains.rules
#
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>$B%9%/%j%W%H$O<!$N$h$&$K:n$C$F$*$-$^$9(B:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
#! /bin/sh
# $B%Q%1%C%H%U%#%k%?@)8f$N$?$a$N%9%/%j%W%H(B
# $B%k!<%k$,$J$1$l$P2?$b$7$J$$(B
[ -f /etc/ipchains.rules ] || exit 0
case "$1" in
start)
echo -n "Turning on packet filtering:"
/sbin/ipchains-restore < /etc/ipchains.rules || exit 1
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "."
;;
stop)
echo -n "Turning off packet filtering:"
echo 0 > /proc/sys/net/ipv4/ip_forward
/sbin/ipchains -F
/sbin/ipchains -X
/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
/sbin/ipchains -P forward ACCEPT
echo "."
;;
*)
echo "Usage: /etc/init.d/packetfilter {start|stop}"
exit 1
;;
esac
exit 0
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>$B$3$l$,5/F0;~$N:G=i$N$&$A$K<B9T$5$l$k$h$&$K$7$^$9!#I.<T$N%1!<%9(B (Debian 2.1) $B$G$O!"(B `S39packetfilter' $B$H$$$&%7%s%\%j%C%/%j%s%/$r(B `/etc/rcS.d' $B%G%#%l%/%H%j$K:n$C$F$"$j$^$9(B($B$3$l$O!"(B S40network $B$NA0$K<B9T$5$l$^$9(B)$B!#(B</P>
<P>($BLuCm(B: $B!V:G=i$N$&$A!W$H$$$&$N$O!"5/F0;~!"%M%C%H%o!<%/$KBP$7$FDL?.$,2DG=$H$J$k>uBV0JA0$K9T$&$H$$$&0UL#$G$9!#(B
$B%M%C%H%o!<%/$NB>$N%5!<%S%9$J$I$,5/F0$7$?$"$H$K%U%!%$%"%&%*!<%k$r@_Dj$9$k$H!"A4$/@_Dj$5$l$F$$$J$$$o$:$+$J=V4V$r$D$$$F(B"$B0-$$$d$D(B"$B$,F~$j9~$`4m81@-$,$"$j$^$9!#(B)</P>
<HR>
<A HREF="IPCHAINS-HOWTO-3.html">$B<!$N%Z!<%8(B</A>
<A HREF="IPCHAINS-HOWTO-1.html">$BA0$N%Z!<%8(B</A>
<A HREF="IPCHAINS-HOWTO.html#toc2">$BL\<!$X(B</A>
</BODY>
</HTML>
|