开机启动的服务

 
 
查看开机启动的服务   chkconfig --list
 
开机自动启动的服务   chkconfig service name  on
 
开机不启动的务       chkconfig service name off
 
 
 
 
增加服务的安全性
 
 
 
服务私有的安全性机制
 
 
服务公用的安全性机制  TCP wrap
 
 
 
服务使用(link 到)libwrap.so 就是使用到tcp.wrap 机制
 
 
 
 
 
如何查看服务link 到那些函数库 
 
例如: ldd /usr/sbin/xinetd
 
 
ldd 查看link 到那些函数库
 
 
 
常见的link 到libwrap.so的服务
 
sendmail;sshd;xinetd;gdm;portmap;vsftpd
 
常见的不支持libwrap.so的服务
 
named;httpd;smb; 只能使用服务的私有安全机制
 
 
 
 
 
libwrap.so 主要是通过下面这两个文件来判断
                      /etc/hosts.allow    先判断
                   
                      /etc/host.deny      后判断
 
 
来提供安全机制
 
 
基本语法;
 
 
 
      daemon_list:client_list【:options】
 
 
 
高级语法
 
      daemon@host:client_list【:options】
 
 
 
 
 
案例:
 
 
in.telnetd:192.168.1.0
 
vdftpd:192.168.1.0/255.255.255.0
 
sshd:192.168.1.
 
sshd:ALL EXCEPT 192.168.1.
 
 
 
 
 
 
增加xinetd 所管理程序的安全性
 
 
tcp_wrapper is still used
 
xinetd provides its own set of access control functions
 
host-based
 
time-based
 
 
host-based
 
xinetd access control 
 
syntax:
 
 
allow with only_from = host_pattern
 
deny with no_access=host_pattern
 
然后在
 
vi /etc/xinetd.d/telnet 
 
增加
 
only_from = 192.168.1.100
 
 
advanced security options 
 
 
 
 
access by time
 
number of simbultaneous connections
 
 
access by time
 
 
 
vi /etc/xinetd.d/telnet 
 
 
 
access_times =9:00-18:00
 
 
 
 
number of simbultaneous connections   可以防止DOS的***
 
 
 
 
 
instances =60    同时连接的数量
 
per_source =5    同一个IP 同时连接的数量