$B_70f!w0l8D?M(B $B$G$9(B
Thread $B$rDI$C$F$J$$$N$G0lE@$@$1!%(B
<20020521133131.B46A.HOTTA@xxxxxxxxxxxxxx>$B$N5-;v$K$*$$$F(B
hotta@xxxxxxxxxxxxxx$B$5$s$O=q$-$^$7$?!#(B
># IP Masquerade
>iptables -A POSTROUTING -t nat -s 192.168.0.0/16 -j SNAT \
> --to-source 10.252.0.132
>
>$B$?$V$s!":G8e$N%k!<%k$,D>@\$N860x$@$H;W$o$l$^$9!#(BIP$B%^%9%+%l!<%I$r(B
>$B$d$k$D$b$j$GF~$l$?$N$G$9$,!"(Bdestination $B$r;XDj$7$F$$$J$$$N$,GT0x!)(B
>
>$B$GIT;W5D$J$N$,!"$=$N$"$H(B
>
>root@ns2 ~# cat ipclear.sh
>#!/bin/bash
>iptables -F INPUT
>iptables -F OUTPUT
>iptables -F FORWARD
>iptables -P INPUT ACCEPT
>iptables -P OUTPUT ACCEPT
>iptables -P FORWARD ACCEPT
>
>$B$H$$$&%9%/%j%W%H$rN.$7$F(B
>
>root@ns2 ~# ./ipclear.sh
>
>root@ns2 ~# iptables -L -n
>Chain INPUT (policy ACCEPT)
>target prot opt source destination
>
>Chain FORWARD (policy ACCEPT)
>target prot opt source destination
>
>Chain OUTPUT (policy ACCEPT)
>target prot opt source destination
>
>root@ns2 ~# ipchains -L -n
>ipchains: Incompatible with this kernel
>
>$B$H$$$&>uBV$K$J$C$F$$$k$N$G!"(Biptables $B4XO"$N@_Dj$O$9$Y$F2r=|$5$l(B
>$B$F$$$k$b$N$H;W$C$F$$$^$7$?!#$H$3$m$,!"$3$N>uBV$G$b(B IP Masq $B$,M-(B
>$B8z$K$J$C$F$$$^$9!#(B
IP Masq $B$,M-8z$@$C$F$$$&$3$H$O(B iptables $B$N@_Dj$,2r=|$5$l$F$$$J$$(B
$B$H$$$&$3$H$G$9!%(B
% iptables -A POSTROUTING -t nat -s 192.168.0.0/16 -j SNAT \
--to-source 10.252.0.132
$B$H$7$F!"@_Dj$7$?$N$G$9$+$i!"(B
% iptables -t nat -L -n
$B$H$9$l$P(Bnat$B$N%k!<%k$,I=<($5$l$^$;$s$+!)(B
% man iptables
$B$G(B -t $B%*%W%7%g%s$N0UL#$rD4$Y$F$_$F$/$@$5$$!#(B
_/ SAWAI, Masahiko _/
_/ rururu@xxxxxxxxxxxxxx _/
_/ $B!V$*$b$7$m$$;E;vJg=8Cf"v!W(B _/