Xinetd is a service-based super service that manages and protects individual services. It plays a pivotal role in the security of linux. The services it manages are some small services that are not very commonly used, but are occasionally used in the system or the services have no good security mechanisms, such as: rysnc, cvs, telnet, etc. It is not a service in the true sense, xinetd is equivalent to the agent of rync, cvs and other services, just like the boss follows the little brother! Its functions can be roughly divided into the following: access control, prevention of DOS attacks, extended days Options, service forwarding, user interactive experience
Xinetd's configuration file:
/etc/xinetd.conf This is the real configuration file of xinetd, and almost all the functions it implements are set here.
/etc/xinetd.d/* There are separate configuration files for each small service in this directory
1. xinetd custom log:
(1) Start the telnet service for testing:
[root@localhost ~]# vi /etc/xinetd.d /krb5-telnet #Open telnet
disable = no #Find this line and change yes to no, yes means close
[root@localhost ~]# service xinetd restart #Restart xinetd service
[root@localhost ~]# netstat -utpln |grep 23 # Check port 23
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 3597/xinetd
3
(2) Adjust the location where the logs are stored:
[root@localhost ~]# telnet 192.168.8.31#telnet on another machine
[root@localhost ~]# tail -1 /var/log/messages #View the default log storage location of the system
Dec 19 01:02:30 localhost xinetd[3597]: START: telnet pid=3615 from=192.168.8.43
[root@localhost ~]# vi /etc/xinetd.conf #Modify daemon to the following
log_type = SYSLOG local2 info
[root@localhost ~]# vi / etc/syslog.conf#Add the following lines to the log configuration file
local2.* /var/log/xinetd.log #Define the log storage directory
[root@localhost ~]# /etc/init.d/syslog restart #Restart the log service
[ root@localhost ~]# /etc/init.d/xinetd restart #Restart xinetd service
[root@localhost ~]# telnet 192.168.8.31 #Test again
[root@localhost ~]# tail /var/log/xinetd.log # View logs at new location
Dec 19 01:18:17 localhost xinetd[3752]: START: telnet pid=3754 from=192.168.8.43
In this way, the logs can be stored in other locations, which is very convenient for management.
Summary of classic functions of Xinetd super service
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=327029913&siteId=291194637
Recommended
Ranking