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B $B4m81EY$ODc!#(BLAN $B$G$N;HMQ$N$_$K!#(B

53 $BHV%]!<%H!J(BDNS, Domain Name Server $B%]!<%H!K!#(B $B%M!<%`%5!<%P$O$3$N%]!<%H$G<*$r$9$^$;!"%[%9%HL>$r(B IP $B%"%I%l%9$K(B $B2r7h$9$k$?$a$NLd$$9g$o$;$K1~$($^$9!#4m81EY$O9b!#(B

67 $BHV(B(UDP)$B%]!<%H!J(BBOOTP, DHCP $B$N%5!<%P%]!<%H!K!#4m81EY$ODc!#(B $B$b$7(B LAN $B$G(B DHCP $B$rMQ$$$k$J$i!"(B $B$3$l$r%$%s%?!<%M%C%H$K$5$i$9I,MW$O$"$j$^$;$s!#(B

68 $BHV(B(UDP)$B%]!<%H!J(BBOOTP $B$^$?$O(B DHCP $B$N%/%i%$%"%s%H%]!<%H!K!#4m81EY$ODc!#(B

69 $BHV%]!<%H!J(Btfpt, Trivial File Transfer Protcol)$B!#(B $B6K$a$F4m81!#K\Ev$K!"K\Ev$KI,MW$J$i!"(BLAN $B$N$_$G;H$C$F$/$@$5$$!#(B

79 $BHV%]!<%H!J(Bfinger, $B%7%9%F%`$H%m%0%$%s$7$F$$$k%f!<%6$N>pJs$rDs6!$9$k$?$a$KMQ$$$i$l$k!K!#(B $B%/%i%C%/$NI8E*$H$7$F$O4m81EY$ODc$$$,!"$"$^$j$KB?$/$N>pJs$rN.$9$?$a!"(B $BAv$i$;$k$Y$-$G$O$J$$!#(B

80 $BHV%]!<%H!J(BWWW $B$^$?$O(B HTTP $BI8=`(B web $B%5!<%P%]!<%H!K!#(B $B%$%s%?!<%M%C%H$G$b$C$H$bDL>o$KMQ$$$i$l$k%5!<%t%#%9!#4m81EY$ODc$$!#(B

98 $BHV%]!<%H!J(BLinuxconf web $B%"%/%;%94IM}%]!<%H!K!#(B $B$b$7!"K\Ev$KI,MW$J$i$P!"(BLAN $B$N$_$G!#(B

110 $BHV%]!<%H(B $B!J(BPOP3 $B$D$^$j(B Post Office Protocol, $B%a%$%k%5!<%P%]!<%H!K!#(B POP $B%a%$%k$G$O!"%f!<%6$,%j%b!<%H%7%9%F%`$+$i%a%$%k$r

111 $BHV%]!<%H!J(Bsunrpc, Sun Remote Procudure Call, $B$^$?$O(B portmapper $B%]!<%H!K!#(B NFS (Network File System), NIS (Network Information Service), $B$=$7$FMM!9$N4X78%5!<%t%#%9$KMQ$$$i$l$^$9!#(B $B4m81$=$&$KJ9$3$($^$9$7!"

113 $BHV%]!<%H!J(Bidentd $B$^$?$O(B auth $B%5!<%P%]!<%H!K!#(B $B8E$$%9%?%$%k$N%5!<%t%#%9!J(BSMTP $B$d(B IRC $B$N$h$&$J!K$G!"(B $B@\B3$r5v2D$9$k$?$a$KMQ$$$i$l$k$3$H$,$"$j!";~$KI,MW$G$9!#(B $B$*$=$i$/$[$H$s$I$N>l9g$G$OI,MW$G$O$J$/!"(B $B4m81EY$ODc$$$G$9$,!"967bpJs$r(B $BM?$($F$7$^$&2DG=@-$,$"$j$^$9!#(B

119 $BHV%]!<%H!J(Bnntp $B$^$?$O%K%e!<%9%5!<%P%]!<%H!K!#4m81EY$ODc!#(B

123 $BHV%]!<%H!J9b$$@:EY$,I,MW$J(B time $B%5!<%P$GF14|$r$9$k$?$a$N(B Network Time $B%W%m%H%3%k!K!#(B $B4m81EY$ODc$$$G$9$,!"$*$=$i$/$[$H$s$I$N%f!<%6$K$OI,MW$G$J$$$G$7$g$&!#(B $B%7%9%F%`%/%m%C%/$r99?7$9$k$K$O!"(B rdate $B$rMQ$$$k$N$,$h$j4JC1$G0BA4$G$9!#(B $B$=$7$F!"(BLAN $B%7%9%F%`$rF14|$9$k$?$a$K$O(B time $B%5!<%t%#%9(B $B$K%S%k%I$5$l$?(B inetd $B$r;H$&$H$$$&(B $BA*Br$b$"$k$G$7$g$&!#(B

137 $B$+$i(B139 $BHV%]!<%H!J(BNetBios (SMB) $B%5!<%t%#%9!K!#(B $B$[$H$s$I$N>l9g!"(BWindows $B4X78$G$9!#(B Linux $B$G$O4m81EY$ODc$$$G$9$,!"(BLAN $B$G$N;HMQ$N$_$K$7$F$/$@$5$$!#(B 137 $BHV$X$N967b$OHs>o$KNI$/8+$i$l$^$9!#(B $BB?$/$OL532$G$O$"$j$^$9$,$?$/$5$s$N%N%$%:$r@8@.$9$k$3$H$G!"(B $BHsFq$5$l$,$A$J(B Redmond $B;:%W%m%H%3%k$G$9!#(B

143 $BHV%]!<%H!J(BIMAP, Interim Mail Access Protocol$B!K!#(B $B$3$l$b$^$?!"%a%$%k

161 $BHV%]!<%H!J(BSNMP, Simple Network Management Protocol$B!K!#(B $B%k!<%?$d%9%$%C%A$,E}7W$d=EBg$J%5%$%s$r%b%K%?$9$k$?$a$K(B $B$b$C$H$bIaDL$KMQ$$$i$l$^$9!#$[$H$s$I$N>l9g$K$OI,MW$G$J$/!"(B $B4m81EY$bDc$$$G$9!#(B

177 $BHV%]!<%H!J(BXDMCP, X $B%5!<%P$K%j%b!<%H@\B3$9$k$?$a$N(B X Display Management Control Protocol$B!K!#(B $B4m81EY$ODc$$$G$9$,!"(BLAN $B$G$N;HMQ$N$_$K$9$k$3$H$r$*4+$a$7$^$9!#(B

443 $BHV%]!<%H!J(BHTTPS, $B9-$/MQ$$$i$l$F$$$k0BA4$J(B HTTP (WWW) $B%W%m%H%3%k!K!#(B $B4m81EY$ODc!#(B

465 $BHV%]!<%H!J(BSSL $B7PM3$N(BSMTP (secure mail server protocol) $B!K!#(B $B4m81EY$ODc!#(B

512 $BHV(B(TCP)$B%]!<%H!J(Bnetstat$B$G$O(B exec $B$HI=<($5$l$^$9$,!"rexec $B$G$9!#!K(B $B4m81$=$&$KJ9$3$($k$G$7$g$&$7!"l9g$G$b(B LAN $B$G$N;HMQ$N$_$K$7$F$/$@$5$$!#(B

512 $BHV(B(UDP)$B%]!<%H!J(Bbiff, $B%a%$%kDLCN%W%m%H%3%k!K!#(B $B4m81EY$ODc!#(BLAN $B$N$_$G!#(B

513 $BHV%]!<%H!J(Blogin, $Brlogin $B$D$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m%H%3%k!#(B $B4m81EY$ODc!#(B

631 $BHV%]!<%H!J(BCUPS $B!J%W%j%s%H%G!<%b%s!K(B web $B%^%M!<%8%a%s%H%]!<%H!K!#(B LAN $B$N$_$N;HMQ$G!#4m81EY$ODc!#(B

635 $BHV%]!<%H!J(Bmountd, NFS $B$N0lIt!K!#(BLAN $B$N$_$N;HMQ$G!#(B

901 $BHV%]!<%H!J(BSWAT, Samba Web $B4IM}%D!<%k%]!<%H!K!#(B LAN $B$N$_$N;HMQ$G!#(B

993 $BHV%]!<%H!J(BSSL $B7PM3$N(BIMAP, $B0BA4$J(B IMAP $B%a%$%k%5!<%t%#%9!K!#(B $B4m81EY$OHs>o$KDc$$!#(B

995 $BHV%]!<%H!J(BSSL $B7PM3$N(B POP, $B0BA4$J(B POP $B%a%$%k%5!<%t%#%9!K!#(B $B4m81EY$OHs>o$KDc$$!#(B

1024 $BHV%]!<%H!J$3$l$O:G=i$N(B"$BHsFC8"(B"$B%]!<%H$G!"(B $BMW5a$,$"$C$?%"%W%j%1!<%7%g%s$KBP$7%+!<%M%k$K$h$C$FF0E*$K3d$jEv$F$i$l$k!K!#(B $B$3$l$O$[$H$s$I2?$K$G$b$J$l$^$9!#>e$N%]!<%H$i$N5-=R$KF1$8!#(B

1080 $BHV%]!<%H!J(BSocks Proxy $B%5!<%P!K!#%/%i%C%+!<$N$*5$$KF~$j$NI8E*$G$9!#(B

1243 $BHV%]!<%H!J(BSubSeven Trojan$B!K!#(BWindows $B$N$_$NLdBj$G$9!#(B

1433 $BHV%]!<%H!J(BMS SQL $B%5!<%P%]!<%H!K!#(B $B;~$KI8E*$K$J$j$^$9!#(BLinux $B$K$OE,MQ$5$l$^$;$s(B.

2049 $BHV%]!<%H!J(Bnfsd, $B$D$^$j(B Network File Service Daemon $B%]!<%H!K!#(B $B4m81EY$O9b!#(BLAN $B$@$1$G;HMQ$9$k$3$H$r4+$a$^$9!#(B

3128 $BHV%]!<%H!J(Bsquid proxy $B%5!<%P%]!<%H!K!#(B $B4m81EY$ODc$$$G$9$,!"$[$H$s$I$N>l9g$O(B LAN $B$G$N;HMQ$N$_$K$9$Y$-$G$9!#(B

3306 $BHV%]!<%H!J(BMySQL $B%5!<%P%]!<%H!K4m81EY$ODc$$$G$9$,!"(B $B$[$H$s$I$N>l9g(B LAN $B$G$N;HMQ$N$_$K$9$Y$-$G$9!#(B

5432 $BHV%]!<%H!J(BPostgreSQL $B%5!<%P%]!<%H!K(BLAN $B$N$_$G!#Hf3SE*Dc%j%9%/!#(B

5631 $BHV(B(TCP), 5632 $BHV(B(UDP)$B%]!<%H!J(BPCAnywhere $B%]!<%H!K!#(B Windows $B$N$_!#(BPCAnywhere $B$OBgJQ(B"$B%N%$%:$NB?$$(B" $B$b$N$K$J$j$($^$9$7!"9-$$HO0O$N%"%I%l%9$K%V%m!<%I%-%c%9%H$7$^$9!#(B

6000 $BHV%]!<%H!J%j%b!<%H@\B3$N$?$a$N(B X11 TCP $B%]!<%H!K!#(B $B4m81EY$ODc$+$iCfDxEY$G$9$,!"$d$O$j!"(BLAN $B$G$N;HMQ$N$_$K$9$Y$-$G$9!#(B $Bssh $B$N(B X11 $B%U%)%o!<%G%#%s%0$O(B 6010 $BHV$+$i%]!<%H$r;H$$;O$a$^$9!#(B

6346 $BHV%]!<%H!J(Bgnutella$B!K!#(B

6667 $BHV%]!<%H!J(Bircd, $B$D$^$j(B Internet Relay Chat Daemon$B!K!#(B

6699 $BHV%]!<%H!J(Bnapster$B!K!#(B

7100-7101 $BHV%]!<%H!J%U%)%s%H%5!<%P$K$3$l$i$N%]!<%H$r;H$&$b$N$,$"$j$^$9!K!#(B $B4m81EY$ODc$$$G$9$,!"(BLAN $B$G$N;HMQ$N$_$G!#(B

8000 $BHV$H(B 8080 $BHV%]!<%H!JDL>o(B web $B%-%c%C%7%e$H%W%m%-%7$N%5!<%P%]!<%H!K!#(B LAN $B$N$_!#(B

10000 $BHV%]!<%H!J(Bwebmin, $B$D$^$j(B web $B%Y!<%9$N%7%9%F%`4IM}%f!<%F%#%j%F%#!K!#(B $B$3$NE@$G$O4m81EY$ODc!#(B

27374 $BHV%]!<%H!J(BSubSeven, $B$D$^$j(B Windows $B$N$_$N(B Trojan $B$G(B $B;HMQ$5$l$^$9!K!#(B1243 $BHV%]!<%H$b$=$&$G$9!#(B

31337 $BHV%]!<%H!J(BBack Orifice, $B$D$^$j!"$^$?JL$NNI$/8+$i$l$k(B Windows $B$N$_$N(B Trojan $B$G;H$o$l$^$9!K!#(B

$B$5$i$KB?$/$N%5!<%t%#%9$HBP1~$9$k%]!<%HHV9f$O(B /etc/services $B$G8+$k$3$H$,$G$-$^$9!#(B $B$^$?!"(B"$B8x<0$N(B"$B%j%9%H$O(B http://www.iana.org/assignments/port-numbers $B$K$"$j$^$9!#(B

$B$3$l$i$HB>$N%]!<%H$X$N%W%m!<%V$,2?$r0UL#$7$F$$$k$+$K$D$$$F$O!"(B Robert Graham $B$K$h$kAG@2$i$7$$2r@O$,0J2<$K$"$j$^$9!'(B http://www.linuxsecurity.com/resource_files/firewalls/firewall-seen.html $B$3$l$OHs>o$KNI$$J88%$G$9!#(B

$B$3$3$G$N$b$&0l$D$N%]%$%s%H$O!"(B $B$3$l$i$,(B$BI8=`$N(B$B%]!<%H;XDj$@$H$$$&$3$H$G$9!#(B $B$I$N%5!<%t%#%9$bFCDj$N%]!<%H$GAv$C$F$$$k$H8@$($kK!B'$O$"$j$^$;$s!#(B $BDL>o$OI8=`%]!<%H$r;H$C$F$$$^$9$,!">o$K$=$&$G$"$k$H$O8B$j$^$;$s!#(B

$B<+J,$N%U%!%$%"!<%&%)!<%k$N%m%0$K(B $B$3$l$i$N%?%$%W$N%]!<%H$,8+$D$+$C$?$+$i$H8@$C$F!"(B $BFMA3Bg92$F$9$kI,MW$O$J$$$H$$$&$3$H$r3P$($F$*$$$F$/$@$5$$!#(B $BA0=R$N%9%F%C%W#1$+$i#3$K=>$C$F!"(B $B%U%!%$%"!<%&%)!<%k$,@5$7$/F/$$$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$O%"%I%l%9(B 192.168.1.1 $B$N>.$5$J(B LAN $B$KMQ$$$i$l$F$$$^$9!#(B

   
$ netstat -tua
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:printer               *:*                     LISTEN     
tcp        0      0 bigcat:8000             *:*                     LISTEN     
tcp        0      0 *:time                  *:*                     LISTEN     
tcp        0      0 *:x11                   *:*                     LISTEN
tcp        0      0 *:http                  *:*                     LISTEN     
tcp        0      0 bigcat:domain           *:*                     LISTEN     
tcp        0      0 bigcat:domain           *:*                     LISTEN     
tcp        0      0 *:ssh                   *:*                     LISTEN     
tcp        0      0 *:631                   *:*                     LISTEN     
tcp        0      0 *:smtp                  *:*                     LISTEN     
tcp        0      1 dsl-78-199-139.s:1174   64.152.100.93:nntp      SYN_SENT   
tcp        0      1 dsl-78-199-139.s:1175   64.152.100.93:nntp      SYN_SENT   
tcp        0      1 dsl-78-199-139.s:1173   64.152.100.93:nntp      SYN_SENT   
tcp        0      0 dsl-78-199-139.s:1172   207.153.203.114:http    ESTABLISHED
tcp        1      0 dsl-78-199-139.s:1199   www.xodiax.com:http     CLOSE_WAIT 
tcp        0      0 dsl-78-199-139.sd:http  63.236.92.144:34197     TIME_WAIT
tcp      400      0 bigcat:1152             bigcat:8000             CLOSE_WAIT 
tcp     6648      0 bigcat:1162             bigcat:8000             CLOSE_WAIT 
tcp      553      0 bigcat:1164             bigcat:8000             CLOSE_WAIT 
udp        0      0 *:32768                 *:*                                
udp        0      0 bigcat:domain           *:*                                
udp        0      0 bigcat:domain           *:*                                
udp        0      0 *:631                   *:*                               

 

$B$*$=$i$/$3$N=PNO$O$"$J$?<+?H$N%7%9%F%`$K$D$$$F$N$b$N$H(B $B$:$$$V$s$H0c$C$?8+$+$1$r$7$F$$$k$+$b$7$l$^$;$s!#(B "Local Address" $B$H(B "Foreign Address" $B$NMs$N4V$N5-=R$N0c$$$H!"(B $B$=$l$>$l$,BP1~$9$k%]!<%HHV9f!J2DG=$J;~$O$=$N%5!<%t%#%9L>!K(B $B$,%3%m%s$N8e$K$I$N$h$&$K=q$+$l$F$$$k$+$KCm0U$7$F$/$@$5$$!#(B "Local Address" $B$O@\B3$N2f!9$NB&$NCLISTEN $B$H=q$+$l$F$$$k:G=i$N%0%k!<%W$O(B $B$3$N%7%9%F%`$G$$$^Av$C$F$$$k%5!<%t%#%9$G$9!#(B $B$3$l$i$O(B bigcat $B$NGX8e$GAv$C$F$$$F!"F~$C$F$/$k@\B3$K(B "$B<*$r$9$^$;$F$$$k(B"$B%5!<%P$G$9!#(B $B$G$9$+$i!"$=$l$i$O3+$$$?%]!<%H$r;}$A!"(B $B$=$3$G(B"$B<*$r$9$^$;$F(B"$B$$$^$9!#(B $B$3$l$i$N@\B3$O%m!<%+%k%7%9%F%`$+$i!J$D$^$j(B bigcat $B<+?H$+$i!K(B $BF~$C$F$-$?$N$+$bCN$l$^$;$s$7!"(B $B$^$?$O%j%b!<%H%7%9%F%`$+$i$N$b$N$+$b$7$l$^$;$s!#(B $B$3$l$OHs>o$K=EMW$J>pJs$G$9!*(B $B$3$N2<$NB>$N$b$N$O$3$N%7%9%F%`$+$iB>$N%7%9%F%`$X3NN)$5$l$F$$$k@\B3$G$9!#(B $B$=$l$>$l$N@\B3$O:G8e$NMs$K%-!<%o!<%I$G<($5$l$F$$$k$h$&$K!"(B $BMM!9$J>uBV$K$"$j$^$9!#:G8e$K$"$k:G8e$NMs$K%-!<%o!<%I$,<($5$l$F$$$J$$(B $B$b$N$O(B UDP $B@\B3$KBP1~$9$k%5!<%P$?$A$G$9!#(B UDP $B$O(B TCP $B$H$OA4$/0[$J$k%W%m%H%3%k$G$9$,!"(B $B$"$k

$B$3$3$G!"(B"$B%5!<%t%#%9L>(B"$B$X$NJQ49$r$5$;$J$$$?$a$K!"(B "-n" $B%U%i%C%0$r$D$1$FF1$8$3$H$r$7$F$_$k$H!"(B $B

$ netstat -taun
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address      State
tcp        0      0 0.0.0.0:515             0.0.0.0:*            LISTEN     
tcp        0      0 127.0.0.1:8000          0.0.0.0:*            LISTEN     
tcp        0      0 0.0.0.0:37              0.0.0.0:*            LISTEN     
tcp        0      0 0.0.0.0:6000            0.0.0.0:*            LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*            LISTEN     
tcp        0      0 192.168.1.1:53          0.0.0.0:*            LISTEN     
tcp        0      0 127.0.0.1:53            0.0.0.0:*            LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*            LISTEN     
tcp        0      0 0.0.0.0:631             0.0.0.0:*            LISTEN     
tcp        0      0 0.0.0.0:25              0.0.0.0:*            LISTEN     
tcp        0      1 169.254.179.139:1174    64.152.100.93:119    SYN_SENT   
tcp        0      1 169.254.179.139:1175    64.152.100.93:119    SYN_SENT   
tcp        0      1 169.254.179.139:1173    64.152.100.93:119    SYN_SENT   
tcp        0      0 169.254.179.139:1172    207.153.203.114:80   ESTABLISHED
tcp        1      0 169.254.179.139:1199    216.26.129.136:80    CLOSE_WAIT 
tcp        0      0 169.254.179.139:80      63.236.92.144:34197  TIME_WAIT 
tcp      400      0 127.0.0.1:1152          127.0.0.1:8000       CLOSE_WAIT 
tcp     6648      0 127.0.0.1:1162          127.0.0.1:8000       CLOSE_WAIT 
tcp      553      0 127.0.0.1:1164          127.0.0.1:8000       CLOSE_WAIT 
udp        0      0 0.0.0.0:32768           0.0.0.0:*                    
udp        0      0 192.168.1.1:53          0.0.0.0:*                      
udp        0      0 127.0.0.1:53            0.0.0.0:*                     
udp        0      0 0.0.0.0:631             0.0.0.0:*          
   
 

$B$3$N:G=i$N?t9T$r>\$7$/8+$F8+$^$7$g$&!#0l9TL\$O!"(B

 tcp        0      0 0.0.0.0:515            0.0.0.0:*          LISTEN     

 

"Local Address" $B$O(B 0.0.0.0 $B$G!"(B $B;HMQ2DG=$JA4$F$N%$%s%?!<%U%'!<%9$r0UL#$7$F$$$^$9!#(B $B%m!<%+%k%]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.1:8000         0.0.0.0:*          LISTEN     

 

$B:#EY$O(B "Local Address" $B$O%m!<%+%k%[%9%H$N%"%I%l%9(B 127.0.0.1 $B$K$J$C$F$$$^$9!#(B $B$3$l$O$3$N%^%7%s$X$N%m!<%+%k@\B3$@$1$,5v2D$5$l$F$$$k$H$$$&$3$H$G!"(B $BBgJQ=EMW$J;ve$N0UL#$OL@Gr$G$7$g$&!#(B $BA4$F$N%5!<%P$,$3$No$KM-8z$J5!G=$G$9!#(B $B$3$NNc$G$N(B 8000 $BHV%]!<%H$O(B web $B%W%m%-%7(B Junkbuster $B$,;H$C$F$$$^$9!#(B

$B<!$N;0$D$N%(%s%H%j$G$O!"$^$?A4$F$N2DG=$J%$%s%?!<%U%'!<%9$N>e$G(B $B<*$r$9$^$;$k$h$&$KLa$C$F$$$^$9!'(B

 tcp        0      0 0.0.0.0:37             0.0.0.0:*           LISTEN     
 tcp        0      0 0.0.0.0:6000           0.0.0.0:*           LISTEN
 tcp        0      0 0.0.0.0:80             0.0.0.0:*           LISTEN     

 

/etc/services $B$r8+$k$H!"(B 37 $BHV%]!<%H$O(B "time" $B%5!<%t%#%9$G!"(B $B$D$^$j$3$N%5!<%P$O(B time $B%5!<%P$G$"$k$3$H$,$o$+$j$^$9!#(B 6000 $BHV%]!<%H$O(B X11 $B$G!"(B 80 $BHV%]!<%H$O(B Apache $B$N$h$&$J(B HTTP $B%5!<%P$NI8=`%]!<%H$G$9!#(B $B$3$3$G$O

$B>e$N:G=i$NFs$D$O@dBP$K!"(B $BB>$NC/$+$K@\B3$7$F$b$i$$$?$$e$HF1MM$K!"$3$N=PNO$+$i$O!"(B $B2?$+$N%U%!%$%"!<%&%)!<%k$,F/$$$F$$$k$+$I$&$+!"(B $B$^$7$F$d$=$l$,$$$+$K8z2LE*$K@_Dj$5$l$F$$$k$+$I$&$+$K$D$$$F$O!"(B $B2?$b8@$($^$;$s!#(B

80 $BHV%]!<%H$N(B web $B%5!<%P<+?H$O(B $BBg$-$J%;%-%e%j%F%#>e$N%j%9%/$G$O$"$j$^$;$s!#(B HTTP $B$O$7$P$7$PA4$F$NK,LdApache $B$J$I$r;H$&$3$H$K$J$k$G$7$g$&!#(B $B$3$l$r%U%!%$%"!<%&%)!<%k$G%*%U$K$7$F!"(B $B%$%s%H%i%M%C%H$N0lIt$H$7$F2f!9$N(B LAN $B%/%i%$%"%s%H$@$1$,(B $B;H$($k$h$&$K@_Dj$9$k$3$H$b2DG=$G$9!#(B $B$^$?!"(B web $B%5!<%P$rAv$i$;$k$3$H$r@5Ev2=$9$kM}M3$,2?$b$J$$$J$i!"(B $B$b$A$m$s40A4$K;HMQIT2DG=$K$7$F$*$/$Y$-$G$7$g$&!#(B

$B<!$NFs$D$N9T$O6=L#?<$$$b$N$G$9!'(B

 tcp        0      0 192.168.1.1:53         0.0.0.0:*           LISTEN     
 tcp        0      0 127.0.0.1:53           0.0.0.0:*           LISTEN     

 

$B:F$S!"(B"Local Address" $B$,(B 0.0.0.0 $B$G$O$J$$$3$H$KCm0U$7$^$7$g$&!#$3$l$O7k9=$J$3$H$G$9!*(B $B:#EY$N%]!<%HHV9f$O(B 53 $BHV!"$D$^$j(B named $B$N$h$&$J(B $B%M%$%`%5!<%P$K$h$C$FMQ$$$i$l$k(B DNS $B%]!<%H$G$9!#(B $B$7$+$7!"$3$N%M%$%`%5!<%P%G!<%b%s$O(B lo $B%$%s%?!<%U%'!<%9!J(Blocalhost)$B!"(B bigcat $B$r(B LAN $B$K@\B3$7$F$$$k%$%s%?!<%U%'!<%9$G(B $B<*$r$9$^$;$F$$$k$@$1$@$H$$$&$3$H$,$o$+$j$^$9!#(B $B$G$9$+$i!"%+!<%M%k$O(B localhost $B$+$i!"$D$^$j(B LAN $B$+$i$N@\B3$N$_$r(B $B5v2D$7$F$$$^$9!#30It$+$i2DG=$J@\B3$O(B 53 $BHV%]!<%H$K$OA4$/$"$j$^$;$s!#(B $B$3$l$O$$$+$K8DJL$N%"%W%j%1!<%7%g%s$r0BA4$K@_Dj$G$-$k$+$r<($9(B $BNI$$Nc$G$9!#$3$N>l9g$G$O!"(BDNS $BMW5a$r07$&$?$a$NBP1~$r$9$kK\Ev$N(B $B%M%$%`%5!<%P$J$i@$3&$K8~$1$F(B 53 $BHV%]!<%H$r3+$/I,MW$,$"$k$G$7$g$&$+$i!"(B $B$3$3$G8+$F$$$k$b$N$O$*$=$i$/%-%c%C%7%s%0(B DNS $B%5!<%P$J$N$G$9!#(B $B30It$K$^$G3+$/$J$i!"(B $B$3$l$O0l$D$N%;%-%e%j%F%#>e$N%j%9%/$G!"FCJL$JBP1~$,I,MW$G$9!#(B

$B:G8e$N;0$D$O(B LISTENER$B!"(B $B$D$^$j%]!<%H$G<*$r$9$^$;$F$$$k%(%s%H%j$G$9!'(B

 tcp        0      0 0.0.0.0:22             0.0.0.0:*           LISTEN     
 tcp        0      0 0.0.0.0:631            0.0.0.0:*           LISTEN     
 tcp        0      0 0.0.0.0:25             0.0.0.0:*           LISTEN     

 

$B$3$l$i$O$^$?A4$F$N2DG=$J%$%s%?!<%U%'!<%9>e$G<*$r$9$^$;$F$$$^$9!#(B 22 $BHV%]!<%H$O(B sshd $B$D$^$j!"(B Secure Shell $B%5!<%P%G!<%b%s$G$9!#$3$l$ONI$$C{8u$G$9!*(B $B:G=i$NNc$N=PNO$r8+$k$K!"(B631 $BHV%]!<%H$N%5!<%t%#%9$OL>A0$r;}$C$F$$$^$;$s!#(B $B$3$l$O$3$3$G2?$+IaDL$G$J$$$3$H$,5/$-$F$$$k>Z5r$+$b$7$l$^$;$s!#(B $B!J$3$NFf$K$D$$$F$NEz$($O<!$N>O$r8+$F$/$@$5$$!#!K(B $B$=$7$F:G8e$K!"(B25 $BHV%]!<%H!"$D$^$j(B SMTP $B%a%$%k%G!<%b%s$NI8=`%]!<%H$G$9!#(B $B$[$H$s$I$N(B Linux $B%$%s%9%H!<%k$G$O$*$=$i$/(B SMTP $B%G!<%b%s$,Av$C$F$$$k$G$7$g$&$+$i!"(B $B$3$l$OI,$:$7$b0[>o$J$3$H$G$O$"$j$^$;$s!#(B $B$G$b!"K\Ev$K(B SMTP $B%G!<%b%s$,I,MW$G$7$g$&$+!)(B

$B<!$N%0%k!<%W$O3NN)$5$l$?@\B3$G$9!#2f!9$NL\E*$K$O!"(B $B:G8e$N%3%i%`$G<($5$l$F$$$k@\B3$N>uBV$O$=$l$[$I=EMW$G$O$"$j$^$;$s!#(B $B$3$l$O(B man $B%Z!<%8$G>\$7$/@bL@$5$l$F$$$^$9!#(B

 tcp        0      1 169.254.179.139:1174    64.152.100.93:119    SYN_SENT   
 tcp        0      1 169.254.179.139:1175    64.152.100.93:119    SYN_SENT    
 tcp        0      1 169.254.179.139:1173    64.152.100.93:119    SYN_SENT   
 tcp        0      0 169.254.179.139:1172    207.153.203.114:80   ESTABLISHED
 tcp        1      0 169.254.179.139:1199    216.26.129.136:80    CLOSE_WAIT 
 tcp        0      0 169.254.179.139:80      63.236.92.144:34197  TIME_WAIT 
 tcp      400      0 127.0.0.1:1152          127.0.0.1:8000       CLOSE_WAIT 
 tcp     6648      0 127.0.0.1:1162          127.0.0.1:8000       CLOSE_WAIT 
 tcp      553      0 127.0.0.1:1164          127.0.0.1:8000       CLOSE_WAIT 

 

$B$3$3$K$OA4It$G(B 9 $B$D$N@\B3$,$"$j$^$9!#(B $B:G=i$N;0$D$O(B 119 $BHV%]!<%H!JI8=`$N(B NNTP $B%K%e!<%9%]!<%H!K(B $B$G%j%b!<%H$N%[%9%H$X@\B3$7$F$$$k30It%$%s%?!<%U%'!<%9$G$9!#(B $B$3$3$G$OF1$8%K%e!<%9%5!<%P$X$N;0$D$N@\B3$,$"$j$^$9!#(B $B$3$l$OF1$80l$D$N%K%e!<%9%5!<%P$KB?=E$N@\B3$r3+$3$&$H$7$F$$$^$9$+$i!"(B $BL@$i$+$K!"$3$N%"%W%j%1!<%7%g%s$O%^%k%A%9%l%C%I2=$5$l$F$$$^$9!#(B $B<!$NFs$D$N%(%s%H%j$O(B 5 $BHVL\$N%3%i%`$K%3%m%s$N8e$K(B 80 $BHV%]!<%H$H(B $B<($5$l$F$$$k$h$&$K!"%j%b!<%H$N(B web $B%5!<%P$K@\B3$7$F$$$^$9!#(B $B$*$=$i$/$[$H$s$I$N>l9g$K$OHs>o$KNI$/8+$i$l$k$b$N$G$7$g$&!#(B $B$7$+$7!"$=$N$9$00l$D8e$N9T$G$O$3$N5U$K!"(B 4 $BHVL\$N%3%i%`$K(B 80 $BHV%]!<%H$,$"$j$^$9!#(B $B$D$^$j$3$l$OC/$+$,!"$=$N30It!"%$%s%?!<%M%C%HB&$N%$%s%?!<%U%'!<%9$r(B $BDL$7$F(B bigcat $B$N(B web $B%5!<%P$K@\B3$7$F$$$k$N$G$9!#(B $B:G8e$N;0$D$N%(%s%H%j$O$9$Y$F%m!<%+%k%[%9%H$+$i%m!<%+%k%[%9%H$X$N@\B3$G$9!#(B $B$D$^$j!"<+J,<+?H$K@\B3$7$F$$$k$N$G$9!#(B 8000 $BHV%]!<%H$,(B bigcat $B$N(B web $B%W%m%-%7$G$"$C$?$3$H$r;W$$JV$;$PJ,$k$h$&$K!"(B $B$3$l$O%m!<%+%k$KAv$C$F$$$k%W%m%-%7$K@\B3$7$F$$$k(B web $B%V%i%&%6$G$9!#(B $B%W%m%-%7$O$=$l<+?H$N30It@\B3$r3+$-$^$9$,!"(B $B$=$N@\B3$,$*$=$i$/(B 4 $B9TL\$H(B 5 $B9TL\$G5/$3$C$F$$$k$3$H$G$7$g$&!#(B

netstat $B$K(B -t $B$H(B -u $B%*%W%7%g%s$NN>J}$r$D$1$?$N$G!"(B TCP $B$H(B UDP $B$NN>J}$N<*$r$9$^$;$F$$$k%5!<%P$,I=<($5$l$F$$$^$9!#(B $B:G8e$N?t9T$O(B UDP $B$N$b$N$G$9!'(B

 udp        0      0 0.0.0.0:32768          0.0.0.0:*                    
 udp        0      0 192.168.1.1:53         0.0.0.0:*                      
 udp        0      0 127.0.0.1:53           0.0.0.0:*                     
 udp        0      0 0.0.0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$/JQ$o$C$F$7$^$&$3$H$@$+$i$G$9!#(B $BNc$($P!"(Bbigcat $B$K$O%W%j%s%?$r@\B3$7$F$"$k$N$G$7$g$&$+!)(B $B$*$=$i$/$=$&$G$7$g$&!"$G$J$1$l$P!"$3$l$OA4$/I,MW$N$J$$%j%9%/$G$9!#(B

8.3.2. $B%]!<%H$H%W%m%;%9=jM-

$B>e$N>O$G$O(B bigcat $B$N%M%C%H%o!<%/$G2?$,5/$3$C$F$$$k$+$K$D$$$F(B $B$?$/$5$s$N$3$H$r3X$S$^$7$?!#$7$+$7!"$=$3$G$O3X$s$@$3$H$G$O!"(B $B2?$,$=$NFCDj$N%5!<%t%#%9$r%9%?!<%H$5$;$?$N$+J,$j$^$;$s!#(B $B:#EY$O$=$l$rD4$Y$^$7$g$&!#(B $B$D$^$j!"2f!9$OFCDj$N%5!<%t%#%9$rDd;_$7$?$$$H;W$C$F$$$k$N$G$9$,!"(B $B$=$l$O>e$N=PNO$+$i$OL@$i$+$J$3$H$G$O$J$$$N$G$9!#(B

-p $B%*%W%7%g%s$r;H$&$H!":G8e$N%3%i%`$K!"(B $B$=$N%W%m%;%9$N(B PID $B$H$=$N%W%m%;%9$r3+;O$7$?%W%m%0%i%`L>$,(B $BI=<($5$l$^$9!#:F$S(B TCP $B%5!<%t%#%9$N%j%9%H$r8+$F$_$^$7$g$&(B $B!J:#EY$O%9%Z!<%9$N4X78>e!":G=i$N;0$D$N%3%i%`$O>JN,$7$F$"$j$^$9!K!#(B $BMxMQ$G$-$k>pJs$rA4$FF@$k$?$a$K!"(B root $B$H$7$F$3$l$r

# netstat -tap
Active Internet connections (servers and established)
  Local Address           Foreign Address      State       PID/Program name
  *:printer               *:*                  LISTEN       988/inetd
  bigcat:8000             *:*                  LISTEN       1064/junkbuster
  *:time                  *:*                  LISTEN       988/inetd
  *:x11                   *:*                  LISTEN       1462/X
  *:http                  *:*                  LISTEN       1078/httpd
  bigcat:domain           *:*                  LISTEN       956/named
  bigcat:domain           *:*                  LISTEN       956/named
  *:ssh                   *:*                  LISTEN       972/sshd
  *:631                   *:*                  LISTEN       1315/cupsd
  *:smtp                  *:*                  LISTEN       1051/master

 

$B$3$l$i$NCf$K$O4{$K4i$J$8$_$N$b$N$b$"$j$^$9!#(B $B$7$+$7:#2s$O!"(B515 $BHV%]!<%H$N%W%j%s%?%G!<%b%s$,(B "988" $BHV$N(B PID $B$G(B inetd $B$rDL$7$F3+;O$5$l$?$3$H$b$o$+$j$^$9!#(B inetd $B$OFCJL$J>u67$G$9!#(B inetd $B$O$7$P$7$P(B "$B%9!<%Q!<%5!<%P(B" $B$H8F$P$l$^$9$,!"$=$l$O$=$Ninetd $B$O(B $B%W%j%s%?%5!<%t%#%9$N$?$a$K(B 515 $BHV%]!<%H$G<*$r$9$^$;$F$$$^$9!#(B $B$3$N%]!<%H$K@\B3$,$d$C$F$/$k$H!"(Binetd $B$,(B $B$3$l$rESCf$GJa$^$($F!"E,@Z$J%G!<%b%s!"(B $B$D$^$j$3$N>l9g$K$O%W%j%s%H%G!<%b%s$r@8@.$9$k$N$G$9!#(B inetd $B$,$3$l$r$I$&07$&$+$N@_Dj$O!"(B $BE57?E*$J>l9g$G$O(B /etc/inetd.conf $B$G$J$5$l$^$9!#(B $B$G$9$+$i!"$b$791>oE*$K(B inetd $B$K@)8f$5$l$F$$$k(B $B%5!<%P$rDd;_$7$?$$$J$i$P!"(Binetd $B!J$^$?$O(B xinetd$B!K$N@_Dj$r>\$7$/D4$Y$J$1$l$P$J$j$^$;$s!#(B $B$^$?>e$N(B time $B%5!<%P$bF1MM$K(B inetd $B7PM3$G3+;O$5$l$F$$$^$9!#$3$N;vtcpwrapper $B!J>e$N%9%F%C%W#3$G@bL@$7$^$7$?!K(B $B$Ginetd $B$rMQ$$$kMxE@$N0l$D$G$9!#(B

$B>e$N>O$G$O(B 631 $BHV%]!<%H$N%5!<%t%#%9$K$D$$$F$O3N?.$,$b$F$^$;$s$G$7$?$M!#(B $B$H8@$&$N$b!"$=$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1051 ?        S        0:24 /usr/libexec/postfix/master

 

$B$3$3$G$O6aF;$r$9$k$?$a$K(B ps $B%3%^%s%I$r(B grep $B$H9g$o$;$F;H$C$F$$$^$9!#(B $B$3$N%U%!%$%k$O(B postfix $B$KB0$7$F$$$k$h$&$G$9!#(B $B$3$l$Osendmail $B$HF1Ey$N%a%$%k%5!<%P$N%Q%C%1!<%8$G$9(B $B!#(B

ps $B$r(B--forest $B%U%i%C%0(B $B!J>JN,7A$O(B -f $B!K$H$H$b$K;H$&$H!"(B $B$I$N%W%m%;%9$,?F%W%m%;%9$+;R%W%m%;%9$+$^$?JL$N$b$N$J$N$+(B $B7hDj$9$k$N$KJXMx$G$9!#0J2<$O$=$N0lNc$G$9!JJT=8$7$F$"$j$^$9!K!'(B

 $ /bin/ps -axf
  956 ?        S      0:00 named -u named
  957 ?        S      0:00  \_ named -u named
  958 ?        S      0:46      \_ named -u named
  959 ?        S      0:47      \_ named -u named
  960 ?        S      0:00      \_ named -u named
  961 ?        S      0:11      \_ named -u named
 1051 ?        S      0:30 /usr/libexec/postfix/master
 1703 ?        S      0:00  \_ tlsmgr -l -t fifo -u -c
 1704 ?        S      0:00  \_ qmgr -l -t fifo -u -c
 1955 ?        S      0:00  \_ pickup -l -t fifo -c
 1863 ?        S      0:00  \_ trivial-rewrite -n rewrite -t unix -u -c
 2043 ?        S      0:00  \_ cleanup -t unix -u -c
 2049 ?        S      0:00  \_ local -t unix
 2062 ?        S      0:00  \_ smtpd -n smtp -t inet -u -c

 

$B$3$3$GFs!";0Cm0U$,$"$j$^$9!#(B $B:#$^$G$KFk@w$_$K$J$C$?%G!<%b%s$,Fs$D$"$j$^$9!'(B named $B$H(B postfix (smtpd) $B$G$9!#(B $BN>J}$H$b%5%V%W%m%;%9$H$7$F@8@.$5$l$?$b$N$G$9!#(B named $B$N>l9g$K$O!"8+$($F$$$k$b$N$O%9%l%C%I$G!"(B $B>o$K@8@.$5$l$F$$$kMM!9$J%5%V%W%m%;%9$G$9!#(B Postfix $B$b@8@.$5$l$?%5%V%W%m%;%9$G$9$,!"(B "$B%9%l%C%I(B"$B$H$7$F$G$O$"$j$^$;$s!#(B $B3F%5%V%W%m%;%9$O$=$l<+?H$NFCDj$N;E;v$r;}$C$F$$$^$9!#(B $B;R%W%m%;%9$O?F%W%m%;%9$K0MB8$7$F$$$k$H$$$&$3$H$O(B $BCm0U$7$F$*$/2ACM$,$"$k$G$7$g$&!#(B $B$G$9$+$i!"?F(B PID $B$r;&$9$H!"$=$N7k2L!"A4$F$N;R%W%m%;%9$,;&$5$l$^$9!#(B

$B$b$7$3$N$I$l$b2?$N8w$bEj$2$+$1$F$/$l$J$$$J$i!"(B $B$5$i$K(B locate $B$r;H$C$F$_$k

 $ locate /master
 /etc/postfix/master.cf
 /var/spool/postfix/pid/master.pid
 /usr/libexec/postfix/master
 /usr/share/vim/syntax/master.vim
 /usr/share/vim/vim60z/syntax/master.vim
 /usr/share/doc/postfix-20010202/html/master.8.html
 /usr/share/doc/postfix-20010202/master.cf
 /usr/share/man/man8/master.8.gz

 

find $B%3%^%s%I$O$*$=$i$/$b$C$H$b<+M3EY$N9b$$(B $B%U%!%$%k$rC5$9%f!<%F%#%j%F%#$G$9$,!"(B locate $B$,$9$k$h$&$K%G!<%?%Y!<%9$r;H$o$J$$$N$G!"(B $B$:$C$HCY$$$G$9!'(B

 $ find / -name master         
 /usr/libexec/postfix/master

 

$B$b$7(B lsof $B$,%$%s%9%H!<%k$5$l$F$$$l$P!"(B $BC/$,%W%m%;%9$d%]!<%H$r=jM-$7$F$$$k$+8+$D$1$k$N$KJXMx$J(B $B$^$?0l$D$N%3%^%s%I$G$9!'(B

 # lsof -i :631       
 COMMAND  PID  USER    FD   TYPE DEVICE SIZE NODE NAME
 cupsd   1315  root    0u   IPv4   3734       TCP *:631 (LISTEN)

 

$B$3$l$O:F$S!"(Bcupsd $B%W%j%s%H%G!<%b%s$,(B 631 $BHV%]!<%H$N=jM-fuser $B$G!"(B $B$3$l$b%$%s%9%H!<%k$5$l$F$$$k$O$:$G$9!'(B

 # fuser -v -n tcp 631

                      USER        PID  ACCESS  COMMAND
 631/tcp              root       1315  f....   cupsd

 

fuser $B$H(B lsof $B%3%^%s%I$NJ8K!$K$D$$$F$O(B man $B%Z!<%8$r;2>H$7$F$/$@$5$$!#(B

$B%5!<%t%#%9$,3+;O$5$l$k>l=j$rC5$9$^$?JL$N>l=j$O!"(B init.d $B%G%#%l%/%H%j$G!"(B $B$3$l$O!J(BSysVinit $B%7%9%F%`$K$D$$$F$O!K(B $Bl=j$G$9!#(B ls -l /etc/init.d/ $B$N$h$&$J$3$H$r$9$l$P!"$3$N%j%9%H$,F@$i$l$k$O$:$G$9!#(B netstat $B$,MQ0U$7$F$/$l$k$h$&$K!"(B $BI,$:$7$b@53N$K(B"$B%W%m%0%i%`L>(B"$B$H0lCW$7$J$$$+$bCN$l$J$$$N$G$9$,!"(B $B$7$P$7$P!"(B $B%9%/%j%W%H$NL>A0<+?H$,$I$N%5!<%t%#%9$r3+;O$5$;$k$N$+$N%R%s%H$K$J$j$^$9!#(B $B$^$?$O!"(Bgrep $B%3%^%s%I$rMQ$$$F!"(B $B%U%!%$%k$NCf?H$rC5$7$F%Q%?!<%s%^%C%A$5$;$k$3$H$b$G$-$^$9!#(B rpc.statd $B$,3+;O$5$l$?>l=j$rC5$9I,MW$,$"$C$F!"(B $B$3$NL>A0$G$O$I$N%9%/%j%W%H$+$o$+$i$J$$!)$G$O!D(B

 # grep rpc.statd /etc/init.d/*
 /etc/init.d/nfslock: [ -x /sbin/rpc.statd ] || exit 0
 /etc/init.d/nfslock:    daemon rpc.statd
 /etc/init.d/nfslock:    killproc rpc.statd
 /etc/init.d/nfslock:    status rpc.statd
 /etc/init.d/nfslock:    /sbin/pidof rpc.statd >/dev/null 2>&1; STATD="$?"

 

$B$3$NA4It$N>pJs$,/$J$/$H$b:#$d@53N$K$I$N%9%/%j%W%H$,$3$l$r3+;O$5$;$F$$$k$N$+$o$+$j$^$7$?!#(B $BA4$F$N%5!<%t%#%9$,$3$N$h$&$K3+;O$5$l$k$N$G$O$J$$$H$$$&$3$H$b(B $B3P$($F$*$$$F$/$@$5$$!#(B inetd $B$d(B xinetd $B7PM3$G3+;O$5$l$k$3$H$b$"$j$^$9!#(B

/proc $B%U%!%$%k%7%9%F%`$b:#Av$C$F$$$k%W%m%;%9$K(B $B$D$$$FCN$j$?$$$3$H$NA4$F$r;}$C$F$$$^$9!#(B $B3F%W%m%;%9$K$D$$$F$5$i$J$k>pJs$r8+$D$1$k$?$a$K!"(B $B$3$l$KLd$$9g$o$;$k$3$H$b$G$-$^$9!#(B $B$"$k%W%m%;%9$r3+;O$7$?%3%^%s%I$X$N%U%k%Q%9$rCN$j$?$$!)(B $B$=$l$J$i$3$&$G$9!#(B

 # ls -l /proc/1315/exe
 lrwxrwxrwx  1 root  root   0 July 4 19:41 /proc/1315/exe -> /usr/sbin/cupsd

 

$B:G8e$K!"(BUDP $B$K<*$r$9$^$;$F$$$k%5!<%t%#%9$K$D$$$F(B $B0l$DFs$D=R$Y$F=*$o$k$3$H$K$7$^$7$g$&!#(B 32768 $BHV%]!<%H$GJQ$J$3$H$,$"$C$?$3$H$r;W$$=P$7$F$/$@$5$$!#(B $B$=$l$O%5!<%t%#%9L>$r;}$C$F$$$J$$$N$G$7$?!#(B

 # netstat -aup
 Active Internet connections (servers and established)
  Local Address           Foreign Address         State       PID/Program name   
   *:32768                 *:*                                 956/named           
   bigcat:domain           *:*                                 956/named           
   bigcat:domain           *:*                                 956/named           
   *:631                   *:*                                 1315/cupsd          

 

$B:#$d(B -p $B%U%i%C%0$G(B "PID/ $B%W%m%0%i%`L>(B"$B%*%W%7%g%s$r4^$a$k$3$H$K$h$C$F!"(B $B$3$l$b(B named $B$D$^$j%M%$%`%5!<%P%G!<%b%s$K(B $BB0$7$F$$$k$3$H$,$o$+$j$^$9!#(B BIND $B$N:G?7$N%P!<%8%g%s$O(B $B$"$k%?%$%W$NDL?.$K$D$$$F$OHsFC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"(B $B$I$N%]!<%H$,3+$$$F$k2DG=@-$,$"$k$N$+$rD4$Y$h$&$H$7$^$9!#(B $BB>$K$O!"$=$l$i$N%]!<%H$,$I$s$J>uBV$K$"$k$N$+$b!#(B nmap $B$OJ#;($J%3%^%s%I%i%$%s$r;}$A!"(B $B?'!9$J%?%$%W$N(B"$B%9%-%c%s(B"$B$,2DG=$G$9!#(B $B>\:Y$K$D$$$F$O(B man $B%Z!<%8$r$_$F$/$@$5$$!#(B

$B$^$:Fs!";0Cm0U$r$7$F$*$-$^$7$g$&!#(B $B$b$7(B portsentry $B$r;H$C$F$$$k$J$i!"(B $B$=$l$rDd;_$7$F$/$@$5$$!#(B $B$3$l$O%9%-%c%s$,$I$3$+$iMh$h$&$,!"$=$N8~$+$&7PO)$rMn$H$7$F$7$^$$$^$9!#(B $B$9$Y$F$N%m%0/$J$/$H$b!"B?$/$N%9%-%c%s$r$9$k$H$-$K$O!"(B $B$*$S$?$@$7$$%m%0$r

$BC1=c$J!"(B"$B%m!<%+%k%[%9%H(B"$B$N%G%U%)%k%H%9%-%c%s!'(B

 # nmap localhost

 Starting nmap V. 2.53 by [email protected] ( www.insecure.org/nmap/ )
 Interesting ports on bigcat (127.0.0.1):
 (The 1507 ports scanned but not shown below are in state: closed)

 Port       State       Service
 22/tcp     open        ssh                     
 25/tcp     open        smtp                    
 37/tcp     open        time                    
 53/tcp     open        domain                  
 80/tcp     open        http                    
 3000/tcp   open        ppp                     

 Nmap run completed -- 1 IP address (1 host up) scanned in 2 seconds

 

$B$3$NJ8=q$N$[$H$s$I$K4{$KL\$rDL$7$F$$$kJ}$K$O!"(B $B:#$d$3$l$i$N%5!<%t%#%9$,8+47$l$?$b$N$K$J$C$F$$$k$3$H$G$7$g$&!#(B $B$3$l$i$NCf$K$O:#$^$G$NB>$NNc$G8+$F$-$?$b$N$HF1$8%]!<%H$,$"$j$^$9!#(B $B$3$N%9%-%c%s$GCm0U$9$Y$-$3$H$O!"(B $B%9%-%c%s$O(B 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ost

 Starting nmap V. 2.53 by [email protected] ( www.insecure.org/nmap/ )
 Interesting ports on bigcat (127.0.0.1):
 (The 131050 ports scanned but not shown below are in state: closed)

 Port       State       Service
 22/tcp     open        ssh                     
 25/tcp     open        smtp                    
 37/tcp     open        time                    
 53/tcp     open        domain                  
 53/udp     open        domain                  
 80/tcp     open        http                    
 3000/tcp   open        ppp                     
 8000/tcp   open        unknown                 
 32768/udp  open        unknown                 

 Nmap run completed -- 1 IP address (1 host up) scanned in 385 seconds

 

$B:#EY$O$?$@(B"$B6=L#$"$k(B"$B%]!<%H$@$1$G$O$J$/!"(B $BA4$F$N%]!<%H$rD4$Y$F$$$^$9!#(B $B$3$N%W%m%;%9$G?7$?$KFs$D$N$b$N$,%T%C%/%"%C%W$5$l$^$7$?!#(B $B2f!9$O0JA0$K4{$K$3$l$i$r(B netstat $B$rMQ$$$F(B $B8+$?$N$G!"2f!9$O$3$l$i$,2?$G$"$k$+$rCN$C$F$$$^$9!#(B $B$=$l$O(B 8000/tcp $B%]!<%H>e$N(B Junkbuster $B%&%'%V%W%m%-%7$H!"(B32768/udp $B%]!<%H>e$N(B named $B$G$9!#(B $B$3$l$K$OA0$N>l9g$h$j$b$C$H!"$b$C$HD9$$;~4V$,$+$+$j$^$9$,!"(B $BA4$F$N%]!<%H$rD4$Y$k$?$a$NM#0l$NJ}K!$G$9!#(B

$B$3$l$G(B bigcat $B$N>e$G$I$N%]!<%H$,3+$$$F$$$k$+$K$D$$$F(B $B$J$+$J$+NI$$>pJs$rF@$i$l$^$7$?!#(B $B$3$3$G$O%m!<%+%k%[%9%H$+$i%m!<%+%k%[%9%H$r%9%-%c%s$7$F$$$^$9$+$i!"(B $BA4$F$N%]!<%H$,2D;k$G$9!#(B $B2f!9$O0MA3$H$7$F30$N@$3&$+$i2f!9$,$I$&8+$($F$$$k$N$+$O$o$+$j$^$;$s!#(B $B$3$3$G!"F1$8(B LAN $BFb$NB>$N%[%9%H$K(B ssh $B@\B3$7$F$_$F!"$^$?%9%-%c%s$7$F$_$^$9!#(B

 # nmap bigcat

 Starting nmap V. 2.53 by [email protected] ( www.insecure.org/nmap/ )
 Interesting ports on bigcat (192.168.1.1):
 (The 1520 ports scanned but not shown below are in state: closed)

 Port       State       Service
 22/tcp     open        ssh
 3000/tcp   open        ppp

 Nmap run completed -- 1 IP address (1 host up) scanned in 1 second

 

$B$3$3$G$O6/D4$N$?$a$K(B iptables $B$N%k!<%k$Ku$7$^$9!#(B $B$3$N%9%-%c%s$G$O$?$@Fs$D$N%]!<%H$,8+$($F$$$^$9!#(B $BB>$NA4$F$O(B"$BJD$8$F(B(closed)"$B$$$^$9!#(B $B$3$l$,(B nmap $B$NJs9p$G$7$?!#(B $B$b$&0lEY$d$C$F$_$^$7$g$&!'(B

 # nmap bigcat

 Starting nmap V. 2.53 by [email protected] ( www.insecure.org/nmap/ )
 Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
 
 Nmap run completed -- 1 IP address (0 hosts up) scanned in 30 seconds

 

$B$*$C$H!":#EY$O;d$,;E;v$r$7$F$$$k4V$K!"(B ICMP (ping) $B$r%V%m%C%/$7$F$7$^$C$?$h$&$G$9!#(B $B$b$&0l2s!'(B

 # nmap -P0 bigcat

 Starting nmap V. 2.53 by [email protected] ( www.insecure.org/nmap/ )
 All 1523 scanned ports on bigcat (192.168.1.1) are: filtered
 
 Nmap run completed -- 1 IP address (1 host up) scanned in 1643 seconds

 

$B$3$l$G$9!#$$$+$KD9$$;~4V$,$+$+$C$F$$$k$+$KCm0U$7$F$/$@$5$$!#(B $B%]!<%H$O:#!"(B"$BJD$8$F(B"$B$$$kBe$o$j$K!"(B "$B%U%#%k%?!<(B"$B$r$+$1$i$l$F$$$k$3$H$KCm0U$7$F$/$@$5$$!#(B "nmap" $B$O$I$&$d$C$F$3$l$rCN$k$N$G$7$g$&!)(B "$BJD$8$F$$$k(B(closed)"$B$H$$$&8@MU$,0UL#$9$k$N$O(B bigcat $B$,(B"$B$3$3$K$O2?$bAv$C$F$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B>$N%U%!%$%k$r(B $BFI$a$PCN$k$3$H$,$G$-$^$9!#(B

#!/bin/sh
# 
# Configure kernel sysctl run-time options. 
# kernel sysctl $B%i%s%?%$%`%*%W%7%g%s@_Dj(B
###################################################################

# Anti-spoofing blocks
# $B%"%s%A!&%9%W!<%U%#%s%0$,%V%m%C%/(B
for i in /proc/sys/net/ipv4/conf/*/rp_filter; 
do
 echo 1 > $i
done

# Ensure source routing is OFF
# $B%=!<%9%k!<%F%#%s%0$r%*%U$K(B
for i in /proc/sys/net/ipv4/conf/*/accept_source_route;
 do
  echo 0 > $i
 done

# Ensure TCP SYN cookies protection is enabled
# TCP SYN $B%/%C%-!<%W%m%F%/%7%g%s$r2DG=$K(B
[ -e /proc/sys/net/ipv4/tcp_syncookies ] &&\
 echo 1 > /proc/sys/net/ipv4/tcp_syncookies 

# Ensure ICMP redirects are disabled
# ICMP $B%j%@%$%l%/%H$rIT2DG=$K(B
for i in /proc/sys/net/ipv4/conf/*/accept_redirects; 
 do
  echo 0 > $i
 done

# Ensure oddball addresses are logged
# $B$*$+$7$J%"%I%l%9$O%m%0$r

8.9. $B%;%-%e%"$JBeBXJ*(B

$B$3$N>O$G$O@x:_E*$K%;%-%e%"$G$J$$J}K!$KBP$7$F!"(B $B0BA4$JBeBXJ*$rR2p$7$^$9!#(B $B%/%i%$%"%s%H$H%5!<%PN>J}$N$4$?$^$<$K$J$C$F$$$^$9!#(B

8.10. ipchains $B$H(B iptables $B:F$S(B

$B$3$N>O$G$O(B ipchains $B$H(B iptables $B$K$G$-$k$3$H$N(B $B$$$/$D$+$r$b$&>/$7>\$7$/8+$F$_$^$9!#(B $B$3$l$i$O4pK\E*$K$O>e$N%9%F%C%W#3$G8+$?$b$N$HF1$8%9%/%j%W%H$G$9$,!"(B $B$$$/$i$+$5$i$K?J$s$@@_Dj%*%W%7%g%s$,DI2C$5$l$F$$$^$9!#(B "$B%^%9%+%l!<%G%#%s%0(B"$B!"(B "$B%]!<%H%U%)%o!<%G%#%s%0(B"$B!"(B $B$"$k%f!<%6$K8BDj$7$?%5!<%t%#%9$X$N%"%/%;%95v2D!"(B $B$=$N$[$+Fs!";0$N5!G=$,Ds6!$5$l$F$$$^$9!#(B $B$=$l$i$N@bL@$K$D$$$F$O%3%a%s%HJ8$rFI$s$G$/$@$5$$!#(B

8.10.1. ipchains II

#!/bin/sh
#
# ipchains.sh
#
# An example of a simple ipchains configuration. This script 
# can enable 'masquerading' and will open user definable ports.
# $BC1=c$J(B ipchains $B@_Dj$NNc!#$3$N%9%/%j%W%H$O!V%^%9%+%l!<%G%#%s%0!W(B
# $B$,2DG=$G!"%f!<%6Dj5A%]!<%H$r3+$/!#(B
###################################################################
# Begin variable declarations and user configuration options ######
# $BJQ?t@k8@$H%f!<%6@_Dj%*%W%7%g%s(B
# Set the location of ipchains (default).
# ipchains $B!J%G%U%)%k%H!K$N>l=j$r@_Dj!#(B
IPCHAINS=/sbin/ipchains

# Local Interfaces
# $B%m!<%+%k%$%s%?!<%U%'!<%9(B
# This is the WAN interface, that is our link to the outside world.
# $B$3$l$O(B WAN $B%$%s%?!<%U%'!<%9!"30$N@$3&$K2f!9$r$D$J$2$k!#(B
# For pppd and pppoe users.
# pppd $B$H(B pppoe $B%f!<%6$N$?$a!#(B
# WAN_IFACE="ppp0"
WAN_IFACE="eth0"
#
# Local Area Network (LAN) interface.
# $B%m!<%+%k%(%j%"%M%C%H%o!<%/(B(LAN)$B%$%s%?!<%U%'!<%9(B
#LAN_IFACE="eth0"
LAN_IFACE="eth1"

# Our private LAN address(es), for masquerading.
# $B2f!9$N%W%i%$%Y!<%H(B LAN $B%"%I%l%9!J$?$A!K!"%^%9%+%l!<%G%#%s%0$N$?$a$N!#(B
LAN_NET="192.168.1.0/24"

# For static IP, set it here! 
# $B%9%?%F%#%C%/(B IP $B$N$?$a!#$3$3$G@_Dj$;$h!*(B
#WAN_IP="1.2.3.4"

# Set a list of public server port numbers here...not too many!
# These will be open to the world, so use caution. The example is
# sshd, and HTTP (www). Any services included here should be the
# latest version available from your vendor. Comment out to disable
# all PUBLIC services.
# $B$3$3$G%Q%V%j%C%/%5!<%P$N%]!<%HHV9f$N%j%9%H$r@_Dj!#B?$9$.$J$$$h$&$K!*(B
# $B$3$l$i$O@$3&$K8~$1$F3+$+$l$k$N$G!"MWCm0U!#$3$NNc$O(B sshd, HTTP(www).
# $B$3$3$N$I$N%5!<%t%#%9$b%t%'%s%@$N:G?7%P!<%8%g%s$K$9$Y$-!#(B
# $BA4$F$N%Q%V%j%C%/%5!<%t%#%9$rIT2DG=$K$9$k$?$a$K$O%3%a%s%H%"%&%H$;$h!#(B
#PUBLIC_PORTS="22 80 443"
PUBLIC_PORTS="22"

# If we want to do port forwarding, this is the host 
# that will be forwarded to.
# $B$b$7%]!<%H%U%)%o!<%G%#%s%0$7$?$$$J$i!"$3$l$,%U%)%o!<%I$5$l$k@h$N%[%9%H(B
#FORWARD_HOST="192.168.1.3"

# A list of ports that are to be forwarded. 
# $B%U%)%o!<%I$5$l$k$Y$-%]!<%H$N%j%9%H(B
#FORWARD_PORTS="25  80"

# If you get your public IP address via DHCP, set this.
# $B$b$7(B DHCP $B$rDL$8$F%Q%V%j%C%/$J(B IP $B%"%I%l%9$r@_Dj$9$k$J$i!"$3$3$G!#(B
DHCP_SERVER=66.21.184.66

# If you need identd for a mail server, set this.
# $B%a%$%k%5!<%P$N$?$a$K(B identd $B$,I,MW$J$i$3$3$G!#(B
MAIL_SERVER=

# A list of unwelcome hosts or nets. These will be denied access 
# to everything, even our 'PUBLIC' services. Provide your own list.
# $BK>$^$L5R$N%[%9%H$H%M%C%H$N%j%9%H!#$3$l$i$OA4$F$X$N%"%/%;%9!"(B
# $B2f!9$N%Q%V%j%C%/%5!<%t%#%9$5$($b!"5qH]$5$l$k(B
# $B<+J,<+?H$N%j%9%H$rMQ0U$;$h!#(B
#BLACKLIST="11.22.33.44 55.66.77.88"

# A list of "trusted" hosts and/or nets. These will have access to 
# ALL protocols, and ALL open ports. Be selective here.
# $B!V?.MQ$G$-$k!W%[%9%H$H(B/$B$^$?$O%M%C%H$N%j%9%H!#$3$l$i$OA4$F$N(B
# $B%W%m%H%3%k$HA4$F$N3+$$$?%]!<%H$K%"%/%;%9$G$-$k!#(B
# $B$3$l$O@:A*$7$F!#(B
#TRUSTED="1.2.3.4/8  5.6.7.8"

## end user configuration options #################################
## $B%(%s%I%f!<%6@_Dj%*%W%7%g%s(B
###################################################################

# The high ports used mostly for connections we initiate and return
# traffic.
# $B%H%i%U%#%C%/$r=i4|2=!"JV?.$N$?$a$N@\B3$Kl=j$+$i$NA4$F$N%"%I%l%9(B
ANYWHERE="0/0"

# Start building chains and rules #################################
# $B%A%'%$%s$H5,B'$N@_Dj$N;O$^$j(B
# Let's start clean and flush all chains to an empty state.
# $B$^$:A4$F$N%A%'%$%s$r6u$N>uBV$K!#(B
$IPCHAINS -F  

# Set the default policies of the built-in chains. If no match for any 
# of the rules below, these will be the defaults that ipchains uses.
# $BAH$_9~$_$N%A%'%$%s$N%G%U%)%k%H%]%j%7!<$r@_Dj!#0J2<$N%k!<%k$N$I$l$K$b(B
# $B0lCW$7$J$1$l$P!"$3$l$i$,(B ipchains $B$N;H$&%G%U%)%k%H$K$J$k!#(B
$IPCHAINS -P forward DENY
$IPCHAINS -P output ACCEPT
$IPCHAINS -P input DENY 

# Accept localhost/loopback traffic.
# localhost/loopback $B%H%i%U%#%C%/$re$,$C$F$$$J$/$F$b!"$3$3$K$*$$$F$$$k$N$G!"(B
# $B%G%U%)%k%H$N%]%j%7!<$,=`Hw$5$l$k!#(B
[ -z "$WAN_IP" ] &&\
  WAN_IP=`ifconfig $WAN_IFACE |grep inet |cut -d : -f 2 |cut -d \  -f 1`

# Bail out with error message if no IP available! Default policy is 
# already set, so all is not lost here.
# $B$I$N(B IP $B$b2DG=$G$J$$$J$i%(%i!<%a%C%;!<%8$H$H$b$KH4$1=P$k!#(B
# $B%G%U%)%k%H%]%j%7!<$O4{$K@_Dj$5$l$F$$$k$N$G!"$9$Y$F$,$3$3$G(B
# $B<:$o$l$k$o$1$G$O$J$$!#(B
[ -z "$WAN_IP" ] && echo "$WAN_IFACE not configured, aborting." && exit 1

WAN_MASK=`ifconfig $WAN_IFACE | grep Mask | cut -d : -f 4`
WAN_NET="$WAN_IP/$WAN_MASK"

## Reserved IPs:
#$B!!M=Ls(B IP:
# We should never see these private addresses coming in from outside 
# to our external interface.
# $B30It$+$i2f!9$N30It%$%s%?!<%U%'!<%9$X!"$3$l$i$N%W%i%$%Y!<%H%"%I%l%9$,(B
# $BF~$C$F$/$k$3$H$O7h$7$F$"$k$Y$-$G$O$J$$!#(B
$IPCHAINS -A input -l -i $WAN_IFACE -s 10.0.0.0/8     -j DENY
$IPCHAINS -A input -l -i $WAN_IFACE -s 172.16.0.0/12  -j DENY
$IPCHAINS -A input -l -i $WAN_IFACE -s 192.168.0.0/16 -j DENY
$IPCHAINS -A input -l -i $WAN_IFACE -s 127.0.0.0/8    -j DENY
$IPCHAINS -A input -l -i $WAN_IFACE -s 169.254.0.0/16 -j DENY
$IPCHAINS -A input -l -i $WAN_IFACE -s 224.0.0.0/4    -j DENY
$IPCHAINS -A input -l -i $WAN_IFACE -s 240.0.0.0/5    -j DENY
# Bogus routing
# $B56$b$N$N%k!<%F%#%s%0(B
$IPCHAINS -A input -l -s 255.255.255.255 -d $ANYWHERE -j DENY

## LAN access and masquerading
# LAN $B%"%/%;%9$H%^%9%+%l!<%G%#%s%0(B
#
# Allow connections from our own LAN's private IP addresses via the LAN
# interface and set up forwarding for masqueraders if we have a LAN_NET
# defined above. 
# LAN $B%$%s%?!<%U%'%9$rDL$8$F$N!"2f!9<+?H$N(B LAN $B$N%W%i%$%Y!<%H(B IP $B%"%I%l%9(B
# $B$+$i$N@\B3$r5v2D$7!">e$G(B LAN_NET $B$,Dj5A$5$l$F$$$l$P%^%9%+%l!<%@!<$N(B
# $B%U%)%o!<%G%#%s%0$r@_Dj$9$k!#(B
if [ -n "$LAN_NET" ]; then 
 echo 1 > /proc/sys/net/ipv4/ip_forward
 $IPCHAINS -A input  -i $LAN_IFACE  -j ACCEPT
 $IPCHAINS -A forward -s $LAN_NET -d $LAN_NET -j ACCEPT
 $IPCHAINS -A forward  -s $LAN_NET -d ! $LAN_NET -j MASQ
fi

## Blacklist hosts/nets
# $B%V%i%C%/%j%9%H(B hosts/nets
#
# Get the blacklisted hosts/nets out of the way, before we start opening 
# up any services. These will have no access to us at all, and will be
# logged.
# $B%V%i%C%/%j%9%H$K$N$C$?%[%9%H(B/$B%M%C%H$r!"$I$N%5!<%t%#%9$b3+$+$l(B
# $B$kA0$KJD$a=P$9!#$3$l$i$O$^$C$?$/2f!9$K%"%/%;%9$r;}$?$:!"(B
# $B%m%0$r$H$i$l$k!#(B
for i in $BLACKLIST; do
 $IPCHAINS -A input -l -s $i -j DENY
done

## Trusted hosts/nets
# $B?.MQ$G$-$k%[%9%H(B/$B%M%C%H(B
#
# This is our trusted host list. These have access to everything.
# $B?.MQ$9$k%[%9%H$N%j%9%H!#$3$l$i$OA4$F$X$N%"%/%;%98"$r;}$D!#(B
for i in $TRUSTED; do
 $IPCHAINS -A input -s $i -j ACCEPT
done

# Port Forwarding
# $B%]!<%H%U%)%o!<%G%#%s%0(B
#
# Which ports get forwarded to which host. This is one to one 
# port mapping (ie 80 -> 80) in this case.
# NOTE: ipmasqadm is a separate package from ipchains and needs 
# to be installed also. Check first!
# $B$I$N%]!<%H$,$I$N%[%9%H$X%U%)%o!<%I$5$l$k$+!#$3$l$O$3$N>l9g(B
# $B0lBP0l$N%^%C%T%s%0!J$D$^$j!"(B80 $B$+$i(B 80 $B$X!K!#(B
# $BCm0U!'(B ipmasqadm $B$O(B ipchains $B$H$OJL$N%Q%C%1!<%8$G!"$3$l$b(B
# $B%$%s%9%H!<%k$9$kI,MW$,$"$k!#$^$:%A%'%C%/$9$k$3$H!#(B
[ -n "$FORWARD_HOST" ] && ipmasqadm portfw -f &&\
 for i in $FORWARD_PORTS; do
   ipmasqadm portfw -a -P tcp -L $WAN_IP $i -R $FORWARD_HOST $i
 done

## Open, but Restricted Access ports/services
# $B3+$$$?!"$7$+$7@)8B$5$l$?%"%/%;%9$N%]!<%H(B/$B%5!<%t%#%9(B
#
# Allow DHCP server (their port 67) to client (to our port 68) UDP traffic
# from outside source.
# $B30It%=!<%9$+$i%/%i%$%"%s%H$N!J2f!9$N(B68$BHV%]!<%H$X$N!K(BUDP $B%H%i%U%#%C%/(B
# $B$X!!(BDHCP $B%5!<%P!J(B67$BHV%]!<%H!K$r5v2D$9$k!#(B
[ -n "$DHCP_SERVER" ] &&\
 $IPCHAINS -A input -p udp -s $DHCP_SERVER 67 -d $ANYWHERE 68 -j ACCEPT 

# Allow 'identd' (to our TCP port 113) from mail server only.
# $B%a%$%k%5!<%P$N$_$+$i!J2f!9$N(B TCP 113 $BHV%]!<%H$X$N!K(B'identd' $B$r5v2D(B
[ -n "$MAIL_SERVER" ] &&\
 $IPCHAINS -A input -p tcp -s $MAIL_SERVER  -d $WAN_IP 113 -j ACCEPT 

# Open up PUBLIC server ports here (available to the world):
# $B$3$3$G(B PUBLIC $B%5!<%P%]!<%H$r3+$/!J@$3&$X7R$2$k$?$a!K!'(B
for i in $PUBLIC_PORTS; do
 $IPCHAINS -A input -p tcp -s $ANYWHERE -d $WAN_IP $i -j ACCEPT 
done

# So I can check my home POP3 mailbox from work. Also, so I can ssh 
# in to home system. Only allow connections from my workplace's
# various IPs. Everything else is blocked.
# $B$3$&$7$F$*$1$P;E;v>l$+$i<+Bp$N(B POP3 $B%a%$%k%\%C%/%9$r%A%'%C%/$G$-$k!#(B
# $B$^$?!"<+Bp%7%9%F%`$X(B ssh $B$GF~$k$3$H$b$G$-$k!#;E;v>l$N$5$^$6$^$J(B
# IP $B%"%I%l%9$+$i$N@\B3$r5v2D$9$k$@$1!#B>$OA4$F%V%m%C%/$5$l$k!#(B
$IPCHAINS -A input -p tcp -s 255.10.9.8/29 -d $WAN_IP 110 -j ACCEPT 

# Uncomment to allow ftp data back (active ftp). Not required for 'passive'
# ftp connections.
# ftp $B%G!<%?%P%C%/!J%"%/%F%#%V(B ftp$B!K$r5v2D$9$k$H$-$O%3%a%s%H%"%&%H$r30$9!#(B
# $B%Q%C%7%V(B ftp $B@\B3$K$D$$$F$OI,MW$J$$!#(B
#$IPCHAINS -A input -p tcp -s $ANYWHERE 20 -d $WAN_IP $LOCAL_PORTS -y -j ACCEPT

# Accept non-SYN TCP, and UDP connections to LOCAL_PORTS. These are
# the high, unprivileged ports (1024 to 4999 by default). This will
# allow return connection traffic for connections that we initiate
# to outside sources. TCP connections are opened with 'SYN' packets.
# We have already opened those services that need to accept SYNs
# for, so other SYNs are excluded here for everything else.
# LOCAL_PORTS $B$X$NHs(B SYN TCP $B$H(B UDP $B@\B3$r$N(B SYN $B$O$=$l0J30$NA4$F$K$D$$$F$3$3$G5q@d$9$k!#(B
$IPCHAINS -A input -p tcp -s $ANYWHERE -d $WAN_IP $LOCAL_PORTS ! -y -j ACCEPT 

# We can't be so selective with UDP since that protocol does not know 
# about SYNs.
# UDP $B$O(B SYN $B$K$D$$$FCN$i$J$$$N$G!"$=$l$[$IA*BrE*$K$G$-$J$$!#(B
$IPCHAINS -A input -p udp -s $ANYWHERE -d $WAN_IP $LOCAL_PORTS -j ACCEPT 

# Allow access to the masquerading ports conditionally. Masquerading
# uses it's own port range -- on 2.2 kernels ONLY! 2.4 kernels, do not 
# use these ports, so comment out!
# $B>l9g$K$h$C$F$O%^%9%+%l!<%I$7$F$$$k%]!<%H$X$N@\B3$r5v2D$9$k!#(B
# $B%^%9%+%l!<%G%#%s%0$O<+?H$N%]!<%HHO0O$rMQ$$$k!J(B2.2 $B%+!<%M%k$N$_$G!*!K!#(B
# 2.4 $B%+!<%M%k$O$3$l$i$N%]!<%H$r;H$o$J$$$N$G!"%3%a%s%H%"%&%H$9$k$h$&$K!*(B
[ -n "$LAN_NET" ] &&\
 $IPCHAINS -A input -p tcp -s $ANYWHERE -d $WAN_IP 61000: ! -y -j ACCEPT &&\
 $IPCHAINS -A input -p udp -s $ANYWHERE -d $WAN_IP 61000: -j ACCEPT

## ICMP (ping)
#
# ICMP rules, allow the bare essential types of ICMP only. Ping
# request is blocked, ie we won't respond to someone else's pings,
# but can still ping out. 
# ICMP $B$N5,B'!"(BICMP $B$N$`$-=P$7$NK\$NC/$+$N(B ping $B$K$OEz$($J$$$,!"(B
# $B<+J,$O(B ping out $B$9$k$3$H$,$G$-$k!#(B
$IPCHAINS -A input  -p icmp  --icmp-type echo-reply \
   -s $ANYWHERE -i $WAN_IFACE -j ACCEPT
$IPCHAINS -A input  -p icmp  --icmp-type destination-unreachable \
   -s $ANYWHERE -i $WAN_IFACE -j ACCEPT
$IPCHAINS -A input  -p icmp  --icmp-type time-exceeded \
   -s $ANYWHERE -i $WAN_IFACE -j ACCEPT

#######################################################################
# Set the catchall, default rule to DENY, and log it all. All other
# traffic not allowed by the rules above, winds up here, where it is
# blocked and logged. This is the default policy for this chain
# anyway, so we are just adding the logging ability here with '-l'.
# Outgoing traffic is allowed as the default policy for the 'output'
# chain. There are no restrictions on that.
# $B$J$s$G$bH"$r$*$-!J%G%U%)%k%H%k!<%k$O(B DENY$B!K!"$=$NA4$F$N%m%0$r$H$k!#(B
# $B>e$N%k!<%k$G5v2D$5$l$F$$$J$$B>$NA4$F$N%H%i%U%#%C%/$r!"$3$3$G(B
# $B;OKv$r$D$1!"%V%m%C%/$7%m%0$r$H$k!#$3$l$O$3$N%A%'%$%s$K$D$$$F$N(B
# $B%G%U%)%k%H$N%]%j%7!<$@$+$i!"$3$3$G$O(B '-l' $B$G%m%0G=NO$rDI2C$9$k$N$_!#(B
# $B30$K8~$+$&%H%i%U%#%C%/$O(B 'output' $B%A%'%$%s$K$D$$$F$N%G%U%)%k%H(B
# $B%]%j%7!<$H$7$F5v2D$5$l$F$$$k!#$3$l$K$D$$$F$O2?$N@)8B$b$*$+$J$$!#(B
$IPCHAINS -A input -l -j DENY

echo "Ipchains firewall is up `date`."

##-- eof ipchains.sh

 

8.10.2. iptables II

#!/bin/sh
#
# iptables.sh
#
# An example of a simple iptables configuration. This script 
# can enable 'masquerading' and will open user definable ports.
# $BC1=c$J(B ipchains $B@_Dj$NNc!#$3$N%9%/%j%W%H$O!V%^%9%+%l!<%G%#%s%0!W(B
# $B$,2DG=$G!"%f!<%6Dj5A%]!<%H$r3+$/!#(B
###################################################################
# Begin variable declarations and user configuration options ######
#  $BJQ?t@k8@$H%f!<%6@_Dj%*%W%7%g%s(B
# Set the location of iptables (default).
# ipchains $B!J%G%U%)%k%H!K$N>l=j$r@_Dj!#(B
IPTABLES=/sbin/iptables

# Local Interfaces
# $B%m!<%+%k%$%s%?!<%U%'!<%9(B
# This is the WAN interface that is our link to the outside world.
# $B$3$l$O(B WAN $B%$%s%?!<%U%'!<%9!"30$N@$3&$K2f!9$r$D$J$2$k!#(B
# For pppd and pppoe users.
# pppd $B$H(B pppoe $B%f!<%6$N$?$a!#(B

# WAN_IFACE="ppp0"
WAN_IFACE="eth0"
#
# Local Area Network (LAN) interface.
# $B%m!<%+%k%(%j%"%M%C%H%o!<%/(B(LAN)$B%$%s%?!<%U%'!<%9(B
#LAN_IFACE="eth0"
LAN_IFACE="eth1"

# Our private LAN address(es), for masquerading.
# $B2f!9$N%W%i%$%Y!<%H(B LAN $B%"%I%l%9!J$?$A!K!"%^%9%+%l!<%G%#%s%0$N$?$a$N!#(B
LAN_NET="192.168.1.0/24"

# For static IP, set it here! 
# $B%9%?%F%#%C%/(B IP $B$N$?$a!#$3$3$G@_Dj$;$h!*(B
#WAN_IP="1.2.3.4"

# Set a list of public server port numbers here...not too many!
# These will be open to the world, so use caution. The example is
# sshd, and HTTP (www). Any services included here should be the
# latest version available from your vendor. Comment out to disable
# all Public services. Do not put any ports to be forwarded here,
# this only direct access.
# $B$3$3$G%Q%V%j%C%/%5!<%P$N%]!<%HHV9f$N%j%9%H$r@_Dj!#B?$9$.$J$$$h$&$K!*(B
# $B$3$l$i$O@$3&$K8~$1$F3+$+$l$k$N$G!"MWCm0U!#$3$NNc$O(B sshd, HTTP(www).
# $B$3$3$N$I$N%5!<%t%#%9$b%t%'%s%@$N:G?7%P!<%8%g%s$K$9$Y$-!#(B
# $BA4$F$N%Q%V%j%C%/%5!<%t%#%9$rIT2DG=$K$9$k$?$a$K$O%3%a%s%H%"%&%H$;$h!#(B
# $B%U%)%o!<%I$5$l$k%]!<%H$O$I$l$b$3$3$K$*$+$J$$$3$H!"$3$l$OD>@\$N(B
# $B%"%/%;%9$N$_!#(B
#PUBLIC_PORTS="22 80 443"
PUBLIC_PORTS="22"

# If we want to do port forwarding, this is the host 
# that will be forwarded to.
# $B$b$7%]!<%H%U%)%o!<%G%#%s%0$7$?$$$J$i!"$3$l$,%U%)%o!<%I$5$l$k@h$N%[%9%H!#(B
#FORWARD_HOST="192.168.1.3"

# A list of ports that are to be forwarded. 
# $B%U%)%o!<%I$5$l$k$Y$-%]!<%H$N%j%9%H(B
#FORWARD_PORTS="25  80"

# If you get your public IP address via DHCP, set this.
# $B$b$7(B DHCP $B$rDL$8$F%Q%V%j%C%/$J(B IP $B%"%I%l%9$r@_Dj$9$k$J$i!"$3$3$G!#(B
DHCP_SERVER=66.21.184.66

# If you need identd for a mail server, set this.
# $B%a%$%k%5!<%P$N$?$a$K(B identd $B$,I,MW$J$i$3$3$G!#(B
MAIL_SERVER=

# A list of unwelcome hosts or nets. These will be denied access 
# to everything, even our 'Public' services. Provide your own list.
# $BK>$^$L5R$N%[%9%H$H%M%C%H$N%j%9%H!#$3$l$i$OA4$F$X$N%"%/%;%9!"(B
# $B2f!9$N%Q%V%j%C%/%5!<%t%#%9$5$($b!"5qH]$5$l$k(B
# $B<+J,<+?H$N%j%9%H$rMQ0U$;$h!#(B
#BLACKLIST="11.22.33.44 55.66.77.88"

# A list of "trusted" hosts and/or nets. These will have access to 
# ALL protocols, and ALL open ports. Be selective here.
# $B!V?.MQ$G$-$k!W%[%9%H$H(B/$B$^$?$O%M%C%H$N%j%9%H!#$3$l$i$OA4$F$N(B
# $B%W%m%H%3%k$HA4$F$N3+$$$?%]!<%H$K%"%/%;%9$G$-$k!#(B
# $B$3$l$O@:A*$7$F!#(B
#TRUSTED="1.2.3.4/8  5.6.7.8"

## end user configuration options #################################
## $B%(%s%I%f!<%6@_Dj%*%W%7%g%s(B
###################################################################

# Any and all addresses from anywhere.
# $BG$0U$N>l=j$+$i$NA4$F$N%"%I%l%9(B
ANYWHERE="0/0"

# These modules may need to be loaded:
# $B$3$l$i$N%b%8%e!<%k$rFI$_9~$`I,MW$,$"$k$+$b!#(B
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp

# Start building chains and rules #################################
## $B%A%'%$%s$H5,B'$N@_Dj$N;O$^$j(B
# Let's start clean and flush all chains to an empty state.
# $B$^$:A4$F$N%A%'%$%s$r6u$N>uBV$K!#(B
$IPTABLES -F
$IPTABLES -X


# Set the default policies of the built-in chains. If no match for any 
# of the rules below, these will be the defaults that IPTABLES uses.
# $BAH$_9~$_$N%A%'%$%s$N%G%U%)%k%H%]%j%7!<$r@_Dj!#0J2<$N%k!<%k$N$I$l$K$b(B
# $B0lCW$7$J$1$l$P!"$3$l$i$,(B IPTABLES $B$N;H$&%G%U%)%k%H$K$J$k!#(B
$IPTABLES -P FORWARD DROP
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P INPUT DROP 

# Accept localhost/loopback traffic.
# localhost/loopback $B%H%i%U%#%C%/$re$G(B LAN_NET $B$,Dj5A$5$l$F$$$l$P%^%9%+%l!<%@!<$N(B
# $B%U%)%o!<%G%#%s%0$r@_Dj$9$k!#(B
if [ -n "$LAN_NET" ]; then 
 echo 1 > /proc/sys/net/ipv4/ip_forward
 $IPTABLES -A INPUT -i $LAN_IFACE  -j ACCEPT
# $IPTABLES -A INPUT -i $LAN_IFACE -s $LAN_NET -d $LAN_NET  -j ACCEPT  
 $IPTABLES -t nat -A POSTROUTING -s $LAN_NET -o $WAN_IFACE -j MASQUERADE
fi

## Blacklist
#$B!!%V%i%C%/%j%9%H(B
# Get the blacklisted hosts/nets out of the way, before we start opening 
# up any services. These will have no access to us at all, and will 
# be logged.
# $B%V%i%C%/%j%9%H$K$N$C$?%[%9%H(B/$B%M%C%H$r!"$I$N%5!<%t%#%9$b3+$+$l(B
# $B$kA0$KJD$a=P$9!#$3$l$i$O$^$C$?$/2f!9$K%"%/%;%9$r;}$?$:!"(B
# $B%m%0$r$H$i$l$k!#(B
for i in $BLACKLIST; do
 $IPTABLES -A INPUT -s $i -m limit --limit 5/minute \
   -j LOG --log-prefix "Blacklisted: "
 $IPTABLES -A INPUT -s $i -j DROP
done

## Trusted hosts/nets
#$B?.MQ$G$-$k%[%9%H(B/$B%M%C%H(B
# This is our trusted host list. These have access to everything.
# $B?.MQ$9$k%[%9%H$N%j%9%H!#$3$l$i$OA4$F$X$N%"%/%;%98"$r;}$D!#(B
for i in $TRUSTED; do
 $IPTABLES -A INPUT -s $i -j ACCEPT
done

# Port Forwarding
#$B%]!<%H%U%)%o!<%G%#%s%0(B
# Which ports get forwarded to which host. This is one to one 
# port mapping (ie 80 -> 80) in this case.
# $B$I$N%]!<%H$,$I$N%[%9%H$X%U%)%o!<%I$5$l$k$+!#$3$l$O$3$N>l9g(B
# $B0lBP0l$N%^%C%T%s%0!J$D$^$j!"(B80 $B$+$i(B 80 $B$X!K!#(B
[ -n "$FORWARD_HOST" ] &&\
 for i in $FORWARD_PORTS; do
   $IPTABLES -A FORWARD -p tcp -s $ANYWHERE -d $FORWARD_HOST \
     --dport $i -j ACCEPT
   $IPTABLES -t nat -A PREROUTING -p tcp -d $WAN_IP --dport $i \
     -j DNAT --to $FORWARD_HOST:$i
 done

## Open, but Restricted Access ports
#$B3+$$$?!"$7$+$7@)8B$5$l$?%"%/%;%9$N%]!<%H(B/$B%5!<%t%#%9(B
# Allow DHCP server (their port 67) to client (to our port 68) UDP
# traffic from outside source.
# $B30It%=!<%9$+$i%/%i%$%"%s%H$N!J2f!9$N(B68$BHV%]!<%H$X$N!K(BUDP $B%H%i%U%#%C%/(B
# $B$X!!(BDHCP $B%5!<%P!J(B67$BHV%]!<%H!K$r5v2D$9$k!#(B
[ -n "$DHCP_SERVER" ] &&\
 $IPTABLES -A INPUT -p udp -s $DHCP_SERVER --sport 67 \
   -d $ANYWHERE --dport 68 -j ACCEPT 

# Allow 'identd' (to our TCP port 113) from mail server only.
# $B%a%$%k%5!<%P$N$_$+$i!J2f!9$N(B TCP 113 $BHV%]!<%H$X$N!K(B'identd' $B$r5v2D(B
[ -n "$MAIL_SERVER" ] &&\
 $IPTABLES -A INPUT -p tcp -s $MAIL_SERVER  -d $WAN_IP --dport 113 -j ACCEPT 

# Open up Public server ports here (available to the world):
# $B$3$3$G(B PUBLIC $B%5!<%P%]!<%H$r3+$/!J@$3&$X7R$2$k$?$a!K!'(B
for i in $PUBLIC_PORTS; do
 $IPTABLES -A INPUT -p tcp -s $ANYWHERE -d $WAN_IP --dport $i -j ACCEPT 
done

# So I can check my home POP3 mailbox from work. Also, so I can ssh 
# in to home system. Only allow connections from my workplace's
# various IPs. Everything else is blocked.
# $B$3$l$K$h$C$F;E;v>l$+$i<+Bp$N(B POP3 $B%a%$%k%\%C%/%9$r%A%'%C%/$G$-$k!#(B
# $B$^$?!"<+Bp%7%9%F%`$X(B ssh $B$GF~$k$3$H$b$G$-$k!#;E;v>l$N$5$^$6$^$J(B
# IP $B%"%I%l%9$+$i$N@\B3$r5v2D$9$k$@$1!#B>$OA4$F%V%m%C%/$5$l$k!#(B
$IPTABLES -A INPUT -p tcp -s 255.10.9.8/29 -d $WAN_IP --dport 110 -j ACCEPT 

## ICMP (ping)
#
# ICMP rules, allow the bare essential types of ICMP only. Ping
# request is blocked, ie we won't respond to someone else's pings,
# but can still ping out.
# ICMP $B$N5,B'!"(BICMP $B$N$`$-=P$7$NK\$NC/$+$N(B ping $B$K$OEz$($J$$$,!"(B
# $B<+J,$O(B ping out $B$9$k$3$H$,$G$-$k!#(B
$IPTABLES -A INPUT  -p icmp  --icmp-type echo-reply \
   -s $ANYWHERE -d $WAN_IP -j ACCEPT
$IPTABLES -A INPUT  -p icmp  --icmp-type destination-unreachable \
   -s $ANYWHERE -d $WAN_IP -j ACCEPT
$IPTABLES -A INPUT  -p icmp  --icmp-type time-exceeded \
   -s $ANYWHERE -d $WAN_IP -j ACCEPT

# Identd Reject
# Identd $B5qH](B
#
# Special rule to reject (with rst) any identd/auth/port 113
# connections. This will speed up some services that ask for this,
# but don't require it. Be careful, some servers may require this
# one (IRC for instance).
# $BA4$F$N(B identd/auth/port 113 $B@\B3$r(B (rst $B$H!K5qH]$9$kFCJL5,B'!#(B
# $B$3$l$rMW5a$9$k$,I,MW$H$O$7$J$$%5!<%t%#%9$r%9%T!<%I%"%C%W$9$k!#(B
# $BMWCm0U!"$3$l$rI,MW$H$9$k%5!<%t%#%9!J(BIRC $B$J$I!K$b$"$k!#(B
#$IPTABLES -A INPUT -p tcp --dport 113 -j REJECT --reject-with tcp-reset

###################################################################
# Build a custom chain here, and set the default to DROP. All
# other traffic not allowed by the rules above, ultimately will
# wind up here, where it is blocked and logged, unless it passes
# our stateful rules for ESTABLISHED and RELATED connections. Let
# connection tracking do most of the worrying! We add the logging
# ability here with the '-j LOG' target. Outgoing traffic is
# allowed as that is the default policy for the 'output' chain.
# There are no restrictions placed on that in this script.
# $B$3$3$G$"$D$i$($N%A%'%$%s$r9=C[$7!"(BDROP $B$X$N%G%U%)%k%H$r@_Dj!#(B
# $B>e$N5,B'$G5v2D$5$l$J$$B>$N%H%i%U%#%C%/$OA4$F!":G=*E*$K$3$3$G(B
# $B;OKv$r$D$1!"(BESTABLISHED $B$H(B RELATED $B@\B3$K$D$$$F$N%9%F%$%H%U%k5,B'(B
# $B$r%Q%9$7$F$$$J$$8B$j!"%V%m%C%/$7%m%0$r$H$k!#@\B3DI@W5!G=$K?4G[;v$N(B
# $B$[$H$s$I$r$d$i$;$^$7$g$&!*$3$3$G$O(B '-j LOG' $B%?!<%2%C%H$G%m%05!G=$r(B
# $BDI2C$9$k!#30$K8~$+$&%H%i%U%#%C%/$O(B 'output' $B%A%'%$%s$K$D$$$F$N(B
# $B%G%U%)%k%H%]%j%7!<$J$N$G5v2D$5$l$F$$$k!#$3$N%9%/%j%W%H$G$O(B
# $B2?$N@)8B$b$*$+$J$$!#(B

# New chain...
# $B?7$7$$%A%'%$%s(B
$IPTABLES -N DEFAULT
# Use the 'state' module to allow only certain connections based 
# on their 'state'.
# $B$=$N(B 'state' $B$K4p$E$$$F$"$ke$G(B
# $BDj5A$7$?$"$D$i$($G:n$C$?(B 'DEFAULT' $B%A%'%$%s$K2!$79~$a$k!#(B
# $B$3$l$O(B FORWARD $B$H(B INPUT $B%A%'%$%s$NN>J}$N$?$a!#(B
$IPTABLES -A FORWARD -j DEFAULT
$IPTABLES -A INPUT   -j DEFAULT

echo "Iptables firewall is up `date`."

##-- eof iptables.sh
 
 

8.10.3. $B$^$H$a(B

$B:G=EMW%]%$%s%H$r4JC1$K$*$5$i$$$7$F$_$^$7$g$&!D(B

$B2f!9$O%[%9%H$K4p$E$$$?%"%/%;%9@)8f$N5,B'!'(B "$B%V%i%C%/%j%9%H$K$"$,$k$b$N(B"$B$H(B"$B?.MQ$G$-$k$b$N(B" $B$NFs$D$K$D$$$F$N5,B'$r2C$($^$7$?!#(B $B$=$7$FMM!9$JPOP3 $B%5!<%P$X$N%"%/%;%95v2D$KHs>o$K6/$$@)8B$r$*$-!"(B $B;E;v>l$+$i$@$1@\B3$G$-$k$h$&$K$7$^$7$?!#(B $B$^$?!"%W%m%P%$%@$N(B DHCP $B%5!<%P$K$D$$$F$bHs>o$K69$$5,B'$@$1$r5v$7$^$7$?!#(B $B$3$N5,B'$O!"30It$N0l$D$N(B IP $B%"%I%l%9$N0l$D$N%]!<%H$K(B $B2f!9$N%]!<%H$N0l$D$@$1$K!"(BUDP $B%W%m%H%3%k$rDL$7$F$N$_!"(B $B@\B3$r5v2D$9$k$b$N$G$7$?!#(B $B$3$l$OHs>o$K8BDj$5$l$?%k!<%k$G$9!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!<%k$K(B $BF~$C$F$-$F$b$i$$$?$/$J$$!'(B"

 ## Insert connection-tracking modules (not needed if built into kernel).
 ## $B@\B3DI@W%b%8%e!<%k$rA^F~!J%+!<%M%kAH$_9~$_$J$iITMW!K!#(B 
 insmod ip_conntrack
 insmod ip_conntrack_ftp

 ## Create chain which blocks new connections, except if coming from inside.
 ## $BFbB&$+$iMh$k$b$N0J30!"?7$7$$@\B3$r%V%m%C%/$9$k%A%'%$%s$r:n@.!#(B
 iptables -N block
 iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
 iptables -A block -m state --state NEW -i ! ppp0 -j ACCEPT
 iptables -A block -j DROP

 ## Jump to that chain from INPUT and FORWARD chains.
 ## INPUT $B$H(B FORWARD $B%A%'%$%s$+$i$=$N%A%'%$%s$X%8%c%s%W!#(B
 iptables -A INPUT -j block
 iptables -A FORWARD -j block

 

$B$3$NC1=c$J%9%/%j%W%H$O2f!9$,=i4|2=$7$?A4$F$N308~$-$N@\B3(B $B$D$^$j!"$9$Y$F$N(B NEW $B@\B3$r5v2D$7$^$9(B $B!J(BACCEPT $B$N%G%U%)%k%H$N%]%j%7!<$OJQ99$5$l$F$$$J$$$N$G!K!#(B $B$=$7$F!"$3$l$i$K$D$$$F(B"ESTABLISHED" $B$H(B "RELATED" $B$5$l$?A4$F$NDL?.$b5v2D$7$^$9!#(B $B$5$i$K!"(BWAN $BB&$N%$%s%?!<%U%'!<%9!"(Bppp0, $B$+$iF~$C$F$-$?$N$G$O$J$$A4$F$N@\B3$b5v2D$5$l$^$9!#(B $B$3$l$O(B lo $B$+!"$^$?$O(B eth1 $B$N$h$&$J(B LAN $B%$%s%?!<%U%'!<%9$G$7$g$&!#(B $B$G$9$+$i2f!9$,$7$?$$$3$H$O2?$G$"$lA4$F2DG=$G$9$,!"(B $B%$%s%?!<%M%C%H$+$i$N!"K>$^$L!"Cf$KF~$C$F$/$k@\B3;n9T$OA4$F5v2D$7$^$;$s!#(B $B2?0l$D!#(B

$B$^$?!"$3$N%9%/%j%W%H$O$"$D$i$($N%A%'%$%s$N:[email protected]$r<($7$F$b$$$^$9!#(B $B$3$3$G$O(B "block" $B$HDj5A$5$l$F$$$F!"(B INPUT $B$H(B FORWARD $B%A%'%$%s$NN>J}$KMQ$$$i$l$F$$$^$9!#(B