CentOS

2006/7/18 06:58 PM 更新

セキュア化

※CentOS 3の情報はページが移動しました。 --> セキュア化(CentOS 3)

CentOSをインストールした時点では不要なサービスが複数稼動しているため必ずしもセキュアとは言えない状況である。
OSをインストールしたらすみやかに不要なサービスは停止しておくことを推奨する。
※ただし、停止するサービスは環境により異なるので注意が必要だ。

以下のサービスをOS起動時に起動しないようにする。
# /sbin/chkconfig haldaemon off
# /sbin/chkconfig smartd off
# /sbin/chkconfig kudzu off
# /sbin/chkconfig cpuspeed off
# /sbin/chkconfig netfs off
# /sbin/chkconfig xinetd off
# /sbin/chkconfig messagebus off
# /sbin/chkconfig readahead off
# /sbin/chkconfig pcmcia off
# /sbin/chkconfig microcode_ctl off
# /sbin/chkconfig irqbalance off
# /sbin/chkconfig acpid off
# /sbin/chkconfig readahead_early off
# /sbin/chkconfig snmpd off
# /sbin/chkconfig sshd off
OSを再起動し起動プロセスを確認する。
# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        S      0:00 init [3]
    2 ?        SN     0:00 [ksoftirqd/0]
    3 ?        S<     0:00 [events/0]
    4 ?        S<     0:00 [khelper]
    5 ?        S<     0:00 [kblockd/0]
    6 ?        S      0:00 [khubd]
   29 ?        S      0:00 [pdflush]
   30 ?        S      0:01 [pdflush]
   32 ?        S<     0:00 [aio/0]
   27 ?        S      0:00 [kapmd]
   31 ?        S      0:00 [kswapd0]
  106 ?        S      0:00 [kseriod]
  184 ?        S      0:00 [kjournald]
 1000 ?        S<s    0:00 udevd
 1116 ?        S<     0:00 [kauditd]
 1149 ?        S<     0:00 [kmirrord]
 1150 ?        S<     0:00 [kmir_mon]
 1173 ?        S      0:00 [kjournald]
 1174 ?        S      0:00 [kjournald]
 1175 ?        S      0:00 [kjournald]
 1176 ?        S      0:00 [kjournald]
 1177 ?        S      0:00 [kjournald]
 1178 ?        S      0:00 [kjournald]
 1753 ?        Ss     0:00 syslogd -m 0
 1757 ?        Ss     0:00 klogd -x
 2036 ?        Ss     0:00 crond
 2074 ?        Ss     0:00 /usr/sbin/atd
 2083 ?        Ss     0:00 dbus-daemon-1 --system
 2092 ?        Ss     0:08 hald
 2099 tty1     Ss+    0:00 /sbin/mingetty tty1
 2100 tty2     Ss+    0:00 /sbin/mingetty tty2
 2101 tty3     Ss+    0:00 /sbin/mingetty tty3
 2102 tty4     Ss+    0:00 /sbin/mingetty tty4
 2103 tty5     Ss+    0:00 /sbin/mingetty tty5
 2104 tty6     Ss+    0:00 /sbin/mingetty tty6
22305 ?        S<     0:00 [krfcommd]