TCP Wrapper คือ เป็นการรักษาความปลอดภัยบน Linux ที่จะ
อนุญาต หรือไม่อนุญาต Host/Network เข้ามาใช้งาน Service ปกติ service ที่นิยมก็มี
vsftpd : 10.104.144.5
vsftpd: 127.0.0.1
telnetd : 192.168.1.100 192.168.5.53
sshd : 192.168.1.100 192.168.5.53
ipop3d: ALL
imapd: ALL
in.tftpd: 192.168.1.0/24
portmap: 192.168.1.
ซึ่งการแก้นั้นให้แก้ที่ /etc/hosts.allow = อนุญาต
/etc/hosts.deny = ไม่อนุญาต
หลังจากแก้ให้ service xineted restart
vsftpd: ALL
ALL: .mynet.com : ALLOW
ALL: ALL: DENY
Alternatively, to prevent access only by hosts in the domain acme.com, the following entries would be needed in hosts.deny:
ALL: .acme.com: DENY
ALL: ALL: ALLOW
จากข้อมูลที่หามาได้ก็ไม่ได้ยากนัก โดยเข้าไปอ่านเพิ่มได้ที่
http://www.hospital-os.com/r&d/view.php?topic_id=20
http://thaicert.nectec.or.th/paper/a...g/portscan.php
เริ่มทดลองกันเลยครับ หา program
[root@mail ~]# rpm -qal | g rep xinetd
/usr/lib/rpm/rpm.xinetd
/etc/xinetd.d/rsync
/usr/share/doc/vsftpd-2.0.1/EXAMPLE/INTERNET_SITE/vsftpd.xinetd
/usr/share/doc/vsftpd-2.0.1/vsftpd.xinetd
/usr/share/doc/stunnel-4.05/pop3-redirect.xinetd
/usr/share/doc/stunnel-4.05/sfinger.xinetd
/etc/rc.d/init.d/xinetd
/etc/sysconfig/xinetd
/etc/xinetd.conf
/etc/xinetd.d/chargen
/etc/xinetd.d/chargen-udp
/etc/xinetd.d/daytime
/etc/xinetd.d/daytime-udp
/etc/xinetd.d/echo
/etc/xinetd.d/echo-udp
/etc/xinetd.d/time
/etc/xinetd.d/time-udp
/usr/sbin/xinetd
/usr/share/doc/xinetd-2.3.13
/usr/share/doc/xinetd-2.3.13/CHANGELOG
/usr/share/doc/xinetd-2.3.13/COPYRIGHT
/usr/share/doc/xinetd-2.3.13/INSTALL
/usr/share/doc/xinetd-2.3.13/README
/usr/share/doc/xinetd-2.3.13/sample.conf
/usr/share/man/man5/xinetd.conf.5.gz
/usr/share/man/man8/xinetd.8.gz
/usr/share/man/man8/xinetd.log.8.gz
/etc/xinetd.d/tftp
/etc/xinetd.d/finger
/etc/xinetd.d/cups-lpd
/etc/xinetd.d
/etc/xinetd.d/eklogin
/etc/xinetd.d/gssftp
/etc/xinetd.d/klogin
/etc/xinetd.d/krb5-telnet
/etc/xinetd.d/kshell
[root@mail ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root]# rpm -qa | grep xinetd
xinetd-2.3.13-4.4E.1
[root@mail ~]# vi /etc/hosts.deny
เพิ่ม ห้าม 10.104.144.45 ใช้ vsftpd
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
vsftpd : 10.104.144.145
save แลัว service xinetd restart
[root@mail ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
ผลการทดลองคือ 412 service not avaiable ดูจากภาพ
จากการทดลองก็ไม่ได้ยากมากนักครับ ขอจบแค่นี้แล้วกัน
ขอบคุณ ลุงตังค์ จาก linuxstep.com ครับ



Reply With Quote
