mygentoo etc # cat /etc/xinetd.d/vsftpd # default: off # description: Vsftpd is an FTP server, designed to be secure. # $Header: /var/cvsroot/gentoo-x86/net-ftp/vsftpd/files/vsftpd.xinetd,v 1.4 2005/06/07 18:34:17 uberlord Exp $ service ftp { socket_type = stream wait = no user = root server = /usr/sbin/vsftpd server_args = /etc/vsftpd/vsftpd.conf log_on_success += DURATION nice = 10 disable = no } mygentoo etc # cat /etc/hosts.allow in.tftpd: 192.168.18.2/128 mygentoo etc # cat /etc/hosts.deny cat: /etc/hosts.deny: 没有那个文件或目录 mygentoo etc # /etc/init.d/xinetd start * Starting xinetd ... [ ok ] mygentoo etc # netstat -tulp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:ftp *:* LISTEN 28280/xinetd tcp 0 0 *:ssh *:* LISTEN 5697/sshd udp 0 0 *:32795 *:* 6144/eva udp 0 0 *:32796 *:* 6144/eva udp 0 0 *:tftp *:* 28280/xinetd mygentoo etc # ps aux|grep ftp root 28285 0.0 0.0 4216 760 pts/1 S+ 18:25 0:00 grep --colour=auto ftp mygentoo etc # mygentoo etc # iptables -L iptables v1.3.8: can't initialize iptables table `filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. mygentoo etc # mygentoo etc # cat /etc/xinetd.conf # # This is the master xinetd configuration file. Settings in the # default section will be inherited by all service configurations # unless explicitly overridden in the service configuration. See # xinetd.conf in the man pages for a more detailed explanation of # these attributes. defaults { # The next two items are intended to be a quick access place to # temporarily enable or disable services. # # enabled = # disabled = # Define general logging characteristics. log_type = SYSLOG daemon info log_on_failure = HOST log_on_success = PID HOST DURATION EXIT # Define access restriction defaults # # no_access = only_from = localhost # max_load = 0 cps = 50 10 instances = 50 per_source = 10 # Address and networking defaults # # bind = # mdns = yes v6only = no # setup environmental attributes # # passenv = groups = yes umask = 002 # Generally, banners are not used. This sets up their global defaults # # banner = # banner_fail = # banner_success = } includedir /etc/xinetd.d