วันอาทิตย์ที่ 12 มิถุนายน พ.ศ. 2554

tip การรักษาความปลอดภัยบน centos

Tip : การรักษาความปลอดภัย โดยปิด Service ที่ไม่ได้ใช้งาน บน CentOS สำหรับ Gateway อย่างเดียว
จากท่าน ton-or""""
Ton-Or — 26 September, 2009 - 11:41
กรณีที่เราไม่ได้ใช้งานด้านอื่นๆ เช่น mail server เน้นนำมาใช้เป็น gateway ต่อ ADSL ของเราอย่างเดียวนั้น Srevice หลายๆตัวที่ run อยู่ ไม่จำเป็นต้องใช้มาปิด Service พวกนั้นกัน
ตรวจสอบ Service ทั้งหมดที่เปิดอยู่ก่อน
chkconfig –list | grep on
จะได้ประมาณนี้
atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
messagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:off
smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off
irqbalance 0:off 1:off 2:off 3:on 4:on 5:on 6:off
rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
isdn 0:off 1:off 2:on 3:on 4:on 5:on 6:off
autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
gpm 0:off 1:off 2:on 3:on 4:on 5:on 6:off
apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
acpid 0:off 1:off 2:off 3:on 4:on 5:on 6:off
microcode_ctl 0:off 1:off 2:on 3:on 4:on 5:on 6:off
pcmcia 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:off
xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
rpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
readahead_early 0:off 1:off 2:off 3:off 4:off 5:on 6:off
readahead 0:off 1:off 2:off 3:off 4:off 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
kudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off
rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off
mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off
ลอกเขามาเลยแล้วกัน

/sbin/chkconfig --level 0123456 portmap off
/sbin/chkconfig --level 0123456 nfslock off
/sbin/chkconfig --level 0123456 netfs off
/sbin/chkconfig --level 0123456 rpcgssd off
/sbin/chkconfig --level 0123456 rpcidmapd off
/sbin/chkconfig --level 0123456 autofs off
/sbin/chkconfig --level 0123456 sendmail off
/sbin/chkconfig --level 0123456 cups off
/sbin/chkconfig --level 0123456 xfs off
/sbin/chkconfig --level 0123456 isdn off
/sbin/chkconfig --level 0123456 pcmcia off

อ้างอิง
http://prefetch.net/blog/index.php/2006/12/27/securing-centos-installations-by-disabling-unneeded-services/
linux - cafedevel - News
1910 reads