etc/xinetd.d目錄
在Linux系統中有一個終極服務程式inetd,大部分的網路服務都是由他啟動的,如chargen、echo、finger、talk、telnet、wu-ftpd等…,在舊版本他的配置是在/etc/inetd.conf中配置的。
在新版本,他就改成了一個xinetd.d目錄。
在xinetd.d目錄中,每一個服務都有一個相應的配置文檔,我們以telnet為例,說明一下各個配置行的含義:
service telnet
{
socket_type=stream
wait=no
user=root
server=/usr/sbin/in.telnetd
log_on_failure+=USERID
disable=yes
}
第一行,說明該配置用來配置telnet服務。
第二行,說明Socket連線類型是stream,也就是TCP
第三行,是指不等待到啟動完成
第四行,是指以root使用者啟動服務進程
第五行,是指服務進程是/usr/sbin/in.telnetd
第六行,是用於做一些出錯日誌
第七行,是指禁止遠方telnet,假如需要開放則將該配置改為:disable=no
修改了xinetd的配置,需要重啟xinetd才能夠生效,有兩種方法能夠實現:
1) 執行如下命令:
/etc/rc.d/init.d/xinetd restart
2) 執行如下命令:
killall -HUP xinetd
註:
1)若還不能telnet,請檢查/etc/hosts.deny,將ALL:ALL注釋掉。
2)若使用虛擬機器,請注意VPC的網卡配置是否正確。
============================================================
修改gssftp:
# /etc/xinetd.d
# ls
# vi gssftp
# default: off
# description: The kerberized FTP server accepts FTP connections \
# that can be authenticated with Kerberos 5.
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args = -l -a
log_on_failure += USERID
disable = off
}
changes to:
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args = -l
log_on_failure += USERID
disable = on
}
用":wq" to save config file.
# more gssftp -> to check the content of configuration file