删除 tftp 服务

删除 tftp 服务

我有 2 个摘录需要解释,第一个是 XINETD.CONF,第二个是 /etc/xinetd.d。我应该确保 tftp 被停用,因为它根本不提供身份验证,因此会带来安全风险。从 /etc/xinetd.d ,我可以清楚地看到

-rw-r--r--.   1 root root    23 Feb 24  2017 tftp

tftp 是否存在,但我不太确定 [FILE]: XINETD.CONF 中的配置是否禁用或删除了 tftp 的访问。那么我该如何解释[FILE]: XINETD.CONF呢?

====================================================
[FILE]: XINETD.CONF
-rw-------. 1 root root 1022 Feb 24  2017 /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 =
# 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

==================================================== 

/etc/xinetd.d

/etc/xinetd.d:
total 68
drwxr-xr-x.   2 root root  4096 Feb 24  2017 .
drwxr-xr-x. 102 root root 12288 Sep  9 02:31 ..
-rw-------.   1 root root  1198 Feb 24  2017 chargen-dgram
-rw-------.   1 root root  1159 Dec 16  2015 chargen-stream
-rw-------.   1 root root  1199 Feb 24  2017 daytime-dgram
-rw-------.   1 root root  1159 Dec 16  2015 daytime-stream
-rw-------.   1 root root  1198 Feb 24  2017 discard-dgram
-rw-------.   1 root root  1200 Feb 24  2017 discard-stream
-rw-------.   1 root root  1189 Feb 24  2017 echo-dgram
-rw-------.   1 root root  1150 Dec 16  2015 echo-stream
-rw-r--r--.   1 root root   332 Mar 28  2014 rsync
-rw-------.   1 root root  1253 Feb 24  2017 tcpmux-server
-rw-r--r--.   1 root root    23 Feb 24  2017 tftp
-rw-------.   1 root root  1149 Dec 16  2015 time-dgram
-rw-------.   1 root root  1150 Dec 16  2015 time-stream

答案1

这应该有助于禁用该服务: https://www.oreilly.com/library/view/linux-security-cookbook/0596003919/ch03s03.html

几乎..打开该 tftp 文件,然后添加disable = yes选项

service tftp
{
        ...
        disable = yes
}

相关内容