LINUX安全配置手册_第1页
LINUX安全配置手册_第2页
LINUX安全配置手册_第3页
LINUX安全配置手册_第4页
LINUX安全配置手册_第5页
已阅读5页,还剩26页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、LINUX安全配置手册综述本文档以典型安装的RedHat Linux 为对象撰写而成,其他版本均差不多类似,按照具体情形进行适当修改即可。文档中的操作需要以root 用户登录至操纵台进行,不举荐使用网络远程的方式进行补丁及配置修改等加固操作。部分操作需要重新启动服务器才会生效,注意某些数据库等应用需要先停止应用,然后才能够重新启动。加固之前第一应对系统中的重要文件及可能修改的文件进行备份,可参照使用以下脚本:for file in /etc/inetd.conf /etc/hosts.equiv /etc/ftpusers /etc/passwd /etc/shadow /etc/hosts.

2、allow /etc/hosts.deny /etc/proftpd.conf /etc/rc.d/init.d/functions /etc/inittab /etc/sysconfig/sendmail /etc/security/limits.conf /etc/exports /etc/sysctl.conf /etc/syslog.conf /etc/fstab /etc/security.console.perms /root/.rhosts /root/.shosts /etc/shosts.equiv /etc/X11/xdm/Xservers /etc/X11/xinit/x

3、serverrc /etc/X11/gdm/gdm.conf /etc/cron.allow /etc/cron.deny /etc/at.allow /etc/at.deny /etc/crontab /etc/motd /etc/issue /usr/share/config/kdm/kdmrc /etc/X11/gdm/gdm.conf /etc/securetty /etc/security/access.conf /etc/lilo.conf /etc/grub.conf /etc/login.defs /etc/group /etc/profile /etc/csh.login /

4、etc/csh.cshrc /etc/bashrc /etc/ssh/sshd_config /etc/ssh/ssh_config /etc/cups/cupsd.conf /etc/,vsftpd/vsftpd.conf /etc/logrotate.conf /root/.bashrc /root/.bash_profile /root/.cshrc /root/.tcshrc /etc/vsftpd.ftpusers ; do -f $file & /bin/cp $file $file-preCISdonefor dir in /etc/xinetd.d /etc/rc0123456

5、.d /var/spool/cron /etc/cron.* /etc/logrotate.d /var/log/etc/pam.d /etc/skel ; do -d $dir & /bin/cp -r $dir $dir-preCIS done补丁系统补丁系统内核版本使用uname -a 查看。软件版本和补丁使用rpm -qa 查看。其他应用补丁除 RedHat 官方提供的系统补丁之外, 系统也应对按照开放的服务和应用进行补丁,如 APACHE、PHP、OPENSSL、MYSQL 等应用进行补丁。具体升级方法:第一确认机器上安装了 gcc 及必要的库文件。然后去应用的官方网站下载对应的源代

6、码包,如*.tar.gz再解压tar zxfv *.tar.gz再按照使用情形对编译配置进行修改,或直截了当采纳默认配置cd *./configure再进行编译和安装makemake install最小化 xinetd 网络服务停止默认服务讲明:Xinetd 是旧的 inetd 服务的替代,他提供了一些网络有关服务的启动调用方式。 Xinetd 应禁止以下默认服务的开放:操作:停止一个服务chkconfig 服务名off打开一个服务chkconfig 服务名on也能够使用 ntsysv 命令进行服务开关调整其他讲明:关于 xinet 必须开放的服务,应该注意服务软件的升级和安全配置,并举荐使用

7、 SSH 和 SSL 对原明文的服务进行替换。如果条件承诺,能够使用系统自带的 iptables 或 tcp-wrapper 功能对访咨询 IP 地址进行限制。操作:Xinetd、SSH 和 SSL、防火墙配置参见对应系统的用户手册, 此不详述。最小化启动服务设置 daemon权限 unmask讲明:默认系统 umask 至少为 022,以防止 daemon被其他低权限用户修改。操作:vi 修改 /etc/rc.d/init.d 文件, umask 值为 022。同时检查 /etc/rc.d/init.d 中其他启动脚本权限是否为755。关闭 xinetd 服务讲明:如果前面第二章关闭xine

8、td 服务中所列的服务,都不需要开放,则能够直截了当关闭xinetd 服务。操作:chkconfig -level 12345 xinetd off关闭邮件服务讲明:如果系统不需要作为邮件服务器,并不需要向别处发邮件,能够直截了当关闭邮件服务。如果不需要作为邮件服务器,然而承诺用户发送邮件,能够设置Sendmail 不运行在 daemon模式。操作:chkconfig -level 12345 sendmail off编辑 /etc/sysconfig/senmail文件增加以下行DAEMON=noQUEUE=1h设置cd /etc/sysconfig/bin/chown root:root

9、sendmail/bin/chmod 644 sendmail关闭图形登录服务讲明:一样来讲,大部分软件的安装和运行都不需要图形环境。如果不需要图形环境进行登录和操作,能够关闭X Windows 的运行。操作:cp /etc/inittab /etc/inittab.bak编辑 /etc/inittab 文件修改 id:5:initdefault: 行为 id:3:initdefault:chown root:root /etc/inittabchmod 0600 /etc/inittab如需要 X Windows 的时候,可运行startx 命令启动图形界面。关闭 X 字体服务器讲明:如果关

10、闭了 X Windows 服务,则 X font 服务器服务也应该进行关闭。操作:chkconfig xfs off关闭其他默认启动服务讲明:系统启动时会启动专门多不必要的服务,这些不必要的服务均存在一定的安全隐患。一样可能存在以下不必要的服务:apmd canna FreeWnn gpm hpoj innd irda isdn kdcrotate lvs mars-nw e oki4daemon privoxy rstatd rusersd rwalld rwhod spamassassinwine nfs nfslock autofs ypbind ypserv yppasswdd por

11、tmap smb netfs lpd apache htt pd tux snmpd named postgresql mysqld webmin kudzu squid cups加固时,应按照机器具体配置使用和应用情形对开放的服务进行调整,关闭不需要的服务。服务运行脚本一样都放在 /etc/rc.d/rc*.d 进行启动,能够使用 chkconfig 工具直截了当进行治理。关于必须通过 /etc/rc.d/rc*.d 开放的服务,应确保都已打上过最新的补丁。操作:chkconfig -level 12345 服务名 off如果关闭了特定的服务,也应该同时对这些服务在系统中的用户加以锁定或删除

12、可能包括以下用户rpc rpcuser lp apache http httpd named dns mysqlpostgres squidusermod -L 要锁定的用户调整 SMB 服务讲明:Samba服务器一样用来提供与Windows 类似的文件和打印共享服务。除非十分必要,否则应关闭SMB( Windows 文件共享)服务。可采纳以下方式开放 SMB 服务。操作:chkconfig smb on调整 NFS 服务器服务讲明:NFS 漏洞较多,经常被利用来取得未授权的文件或系统权限。除非十分必要,否则应关闭NFS 服务。可采纳以下方式开放SMB 服务,并应该限制 export 文件系统

13、的中的IP 地址范畴,以及增加只读权限。操作:chkconfig -level 345 nfs on调整 NFS 客户端服务讲明:NFS 客户端服务一样用来访咨询其他NFS 服务器。除非十分必要,否则应关闭此服务。可采纳以下方式开放此服务。操作:chkconfig -level 345 nfslock onchkconfig -level 345 autofs on调整 NIS 服务器服务讲明:NIS 用来提供基于 UNIX 的域治理和认证手段。 除非十分必要,否则应关闭此服务。可采纳以下方式开放此服务。操作:chkconfig ypserv onchkconfig yppasswdd on调

14、整 NIS 客户端服务讲明:NIS 客户端用来访咨询其他NIS 服务器。除非十分必要,否则应关闭此服务。可采纳以下方式开放此服务。操作:chkconfig ypbind on调整 RPC 端口映射服务讲明:RPC 协议一样通过比较简单的或不经认证就能够得到一些专门敏锐的信息。同时 RPC 系列服务都存在一些缓冲区溢出咨询题。在以下情形下能够考虑关闭RPC 端口映射服务:服务器不是 NFS 服务器或客户端;服务器不是 NIS 服务器或客户端;服务器没有运行其它依靠于 RPC 服务的第三方软件;服务器不运行图形界面( x-windows)。操作:chkconfig -level 345 portm

15、ap on调整 netfs 服务讲明:此服务会作为客户端挂接网络中的磁盘。如果没有网络文件共享协议如 NFS,NovellNetware 或 Windows 文件共享使用,则能够关闭此服务。操作:chkconfig -level 345 netfs on调整打印机服务讲明:UNIX 打印服务存在较多的安全漏洞。 如果系统不作为网络中的打印机服务器,则能够关闭此服务。如果必须使用此服务,第一应保证软件都通过最新的补丁,然和设置cupsd进程运行在非root 用户和组。操作:if -e /etc/init.d/cups ; thenchkconfig cups onsed s/#User lp/U

16、ser lp/ /etc/cups/cupsd.conf /etc/cups/cupsd.conf.newsed s/#Group sys/Group sys/ /etc/cups/cupsd.conf.new /etc/cups/cupsd.conf rm -f /etc/cups/cupsd.conf.new /bin/chown lp:sys /etc/cups/cupsd.conf/bin/chmod 600 /etc/cups/cupsd.conffichkconfig hpoj onchkconfig lpd on调整 Web 服务器服务讲明:如果服务器必须开放Web,则需要作如下

17、设置。应注意web 名目权限设置,不要承诺名目list 。操作:chkconfig apahce on或chkconfig httpd on调整 SNMP 服务讲明:简单网络治理协议SNMP 一样用来监控网络上主机或设备的运行情形。如果必须打开,则必须更换默认通讯字。操作:chkconfig snmpd on编辑 /etc/snmp/snmpd.confcom2sec notConfigUser default public修改 public 为其他一个足够复杂的密码。调整 DNS 服务器服务讲明:DNS 服务器服务用来为其他机器提供DNS 解析,一样来讲都能够关掉。如果必须进行开放,则必须升

18、级至最新版本,并举荐设置chroot 环境,还需要注意限制 DNS 配置文件中的区域传输等设置(加密码或加IP 地址限制)。操作:chkconfig named on调整 SSHD 服务器服务讲明:SSHD 服务器服务用来提供SSH Server 的服务。如果必须进行开放,则必须升级至最新版本,并举荐设置chroot 环境,还需要注意限制SSH 配置文件中的区域传输等设置, 需要在 SSHD 配置文件中禁用ssh1方式连接,因 ssh1方式连接是非完全加密。操作:如使用 Openssh,则检查 /etc/ssh/sshd_configgrep Protocol /etc/ssh/sshd_co

19、nfiggrep Protocol /etc/ssh2/sshd2_config调整 SQL 服务器服务讲明:如果不需要数据库服务,则能够关闭此服务。如果必须进行开放,则注意修改数据库用户的密码,并增加数据库用户IP 访咨询限制。操作:chkconfig postgresql onchkconfig mysqld on调整 Webmin 服务讲明:Webmin 是一个通过 HTTP 协议操纵 linux 的工具,一样举荐使用SSH进行系统治理而不要使用此工具。操作:chkconfig webmin on调整 Squid 服务讲明:Squid 服务是客户端与服务器之间的代理服务。Squid 服务

20、已显现过专门多安全漏洞,同时如果设置不当的话,可能导致被利用来作为内外网之间的跳板。如果不需要,则能够关闭此服务。如果必须打开,则需要设置承诺访咨询的地址列表及认证。操作:chkconfig squid on调整 kudzu 硬件探测服务讲明:Kudzu 服务是 linux 的硬件探测程序,一样设置为启动系统的时候运行。他会检测系统中的硬件的改变,同时会提示进行配置等。未经授权的新设备存在的一定的安全风险,系统启动时操纵台就能够配置任何新增加的设备。如果不需要经常的改动硬件,则需要进行关闭。能够在增加新设备时手工运行 /etc/rc.d/init.d/kudzu 启动此服务。操作:chkcon

21、fig -level 345 kudzu on内核参数网络参数调整讲明:Linux 支持的对网络参数进行调整。具体参数详细讲明,可参见http:/lxr.linux.no/source/Documentation/networking/ip-sysctl.txt 。操作:编辑 /etc/sysctl.conf增加net.ipv4.tcp_max_syn_backlog = 4096net.ipv4.conf.all.rp_filter = 1net.ipv4.conf.all.accept_source_route = 0net.ipv4.conf.all.accept_redirects =

22、 0net.ipv4.conf.all.secure_redirects = 0net.ipv4.conf.default.rp_filter = 1net.ipv4.conf.default.accept_source_route=net.ipv4.conf.default.accept_redirects = 0net.ipv4.conf.default.secure_redirects = 0/bin/chown root:root /etc/sysctl.conf/bin/chmod 0600 /etc/sysctl.conf更多的网络参数调整讲明:如果系统不作为在不同网络之间的防火墙

23、或网关时,可进行如下设置。具体参数详细讲明,可参见http:/lxr.linux.no/source/Documentation/networking/ip-sysctl.txt 操作:编辑 /etc/sysctl.conf增加net.ipv4.ip_forward = 0net.ipv4.conf.all.send_redirects = 0net.ipv4.conf.default.send_redirects = 0/bin/chown root:root /etc/sysctl.conf/bin/chmod 0600 /etc/sysctl.conf日志系统认证日志配置讲明:不是所有版

24、本的 linux 都会在日之中记录登陆信息。 一样需要对这些重要的安全有关的信息进行储存, (如成功或失败 su,失败的登陆, root 登陆等)。这些将会被记录在 /var/log/secure 文件里。操作:编辑 /etc/syslog.conf确认有如下行authpriv.*/var/log/securetouch /var/log/secure/bin/chown root:root /var/log/secure/bin/chmod 600 /var/log/secureFTP 进程日志配置讲明:系统默认会记录wu-ftpd 和 vsftpd 所有的连接和文件传输。 以下将会确认所有

25、法发送到服务期的命令将会被记录。wu-ftpd 将会把安全有关的或是策略边界的行为经历文件传输记录到syslog 里,默认位于 /var/log/xferlog 。操作:编辑 /etc/xinetd.d/wu-ftpd 文件确认有如下行server_args = -l -a -d/bin/chown root:root wu-ftpd/bin/chmod 644 wu-ftpd编辑 /etc/vsftpd.conf 或 /etc/vsftpd/vsftpd.conf 文件确认有如下行xferlog_std_format=NOlog_ftp_protocol=YESlog_ftp_protoco

26、l=YES/bin/chmod 0600 vsftpd.conf/bin/chown root:root vsftpd.conf确认系统日志权限讲明:爱护系统日志文件可不能被非授权的用户所修改。操作:cd /var/log/bin/chmod o-w boot.log* cron* dmesg ksyms* httpd/*maillog* messages* news/* pgsql rpmpkgs* samba/* scrollkeeper.log secure* spooler* squid/* vbox/* wtmp /bin/chmod o-rx boot.log* cron* mai

27、llog* messages* pgsql secure* spooler* squid/*/bin/chmod g-w boot.log* cron* dmesg httpd/* ksyms* maillog* messages* pgsql rpmpkgs* samba/* scrollkeeper.log secure* spooler*/bin/chmod g-rx boot.log* cron* maillog* messages* pgsql secure* spooler*/bin/chmod o-w gdm/ httpd/ news/ samba/ squid/ vbox/ /

28、bin/chmod o-rx httpd/ samba/ squid/bin/chmod g-w gdm/ httpd/ news/ samba/ squid/ vbox/ /bin/chmod g-rx httpd/ samba/ /bin/chown -R root:root ./bin/chgrp utmp wtmp/bin/chown -R news:news news/bin/chown postgres:postgres pgsql/bin/chown -R squid:squid squid文件 /名目权限/etc/fstab 中适当分区增加“ nodev”选项讲明:在我们已知不

29、包含设备的分区增加nodev 参数,防止用户挂接分区中未授权设备。此项加固要比较慎重。操作:编辑 /etc/fstab 文件在非 /的 ext2 和 ext3 分区后增加 nodev 参数/bin/chown root:root /etc/fstab/bin/chmod 0644 /etc/fstab/etc/fstab 中移动设备增加“ nosuid”“nodev”选项讲明:可移动的媒体可能导致恶意的程序进入系统。能够将这些文件系统设置 nosuid 选项,此选项能够防止用户使用CD-ROM 或软盘将设置了SUID的程序带到系统里。参照上节,这些文件系统也应当设置nodev 选项。操作:编辑

30、 /etc/fstab 文件在 floppy 和 cdrom 分区后增加 nosuid,nodev参数/bin/chown root:root /etc/fstab/bin/chmod 0644 /etc/fstab禁止用户挂接可移动文件系统讲明:PAM 模块中的 pam console参数给操纵台的用户临时的额外特权。其配置位于 /etc/security/console.perms文件。默认设置承诺操纵台用户操纵能够与其他主机共享的软盘和CD-ROM 设备。这些可移动媒体存在着一定的安全风险。以下禁止这些设备的额外特权。操作:编辑 /etc/security/console.perms文件

31、修改其中的 console 行,删除以下设备之外的行/sound|fb|kbd|joystick|v4l|mainboard|gpm|scanner/bin/chown root:root console.perms/bin/chmod 0600 console.perms检查 passwd,shadow和 group 文件权限讲明:检查以下文件的默认权限。操作:cd /etc/bin/chown root:root passwd shadow group/bin/chmod 644 passwd group/bin/chmod 400 shadow全局可写名目应当设置粘滞位讲明:当一个名目设

32、置了粘滞位之后,只有文件的属主能够删除此名目中的文件。设置粘滞位能够防止用户覆盖其他用户的文件。如/tmp 名目。操作:find / -xdev -type d -perm -0002 -a ! -perm -1000 -print 找出未授权的全局可写名目讲明:全局可写文件能够被任意用户修改。全局可写文件可能造成一些脚本或程序被恶意修改后造成更大的危害,一样应拒绝其他组的用户的写权限。操作:find / -perm -0002 -type f -xdev -printchmod o-w 找出未授权的 SUID/SGID 文件讲明:治理员应当检查没有其他非授权的SUID/SGID 在系统内。操

33、作:find / -perm -04000 -o -perm -02000 -type f -xdev -print找出专门和隐藏的文件讲明:入侵者容易将恶意文件放在这名目中或命名如此的文件名。关于检查出来的数据需要核对与否系统自身的文件。操作:find / -name . -exec ls -ldb ;find / -name .*-exec ls -ldb ;系统访咨询,授权和认证删除 .rhosts文件讲明:R 系列服务( rlogin ,rsh,rcp)使用 .rhosts文件,它使用基于网络地址或主机名的远端机算计弱认证 (专门容易被伪造)。如果必须使用 R 系列服务,则必须保证 .

34、rhosts文件中没有“ +”,同时同时指定对方系统和用户名。如果有防火墙,则应该在过滤外部网段至内部的全部 R 系列服务访咨询。同时需要保证 .rhosts 文件仅能够被所有者读取( 600)。操作:for file in /etc/pam.d/* ; dogrep -v rhosts_auth $file $file.new/bin/mv $file.new$file/bin/chown root:root $file/bin/chmod 644 $filedone创建危险文件的链接讲明:防止创建危险的 /root/.rhosts,/root/.shosts,/etc/hosts.equi

35、v和 /etc/shosts.equiv 文件。操作:/bin/rm /root/.rhostsln -s /dev/null /root/.rhosts/bin/rm /root/.shostsln -s /dev/null /root/.shosts/bin/rm /etc/hosts.equivln -s /dev/null /etc/hosts.equiv/bin/rm /etc/shosts.equivln -s /dev/null /etc/shosts.equiv创建 ftpuser 文件讲明:/etc/ftpusers和/etc/vsftp.ftpusers文件里的用户列表里的

36、用户将拒绝通过WU-FTPD 和 vsftpd 访咨询系统。 通常情形下, 应当不承诺一些系统用户访咨询 FTP,同时任何时候都不应当使用root 用户访咨询 FTP。/etc/vsftpd.user类似上述功能。操作:for name in cut -d: -f1 /etc/passwddoif id -u $name -lt 500 thenecho $name /etc/ftpusersfidone/bin/chown root:root /etc/ftpusers/bin/chmod 600 /etc/ftpusersif -e /etc/vsftpd.conf | -e /etc/v

37、sftpd/vsftpd.conf ; then/bin/rm -f /etc/vsftpd.ftpusers/bin/cp /etc/ftpusers /etc/vsftpd.ftpusersfi关闭 X-Windows 的开放端口讲明:X 服务器在 6000/tcp 监听远端客户端的连接。 X-Windows 使用相对不安全的认证方式,取得 X 认证的用户专门容易就能够操纵整台服务器。删除选项中的 “-nolisten tcp”能够使 X 服务器不再监听6000/tcp 端口。操作:if -e /etc/X11/xdm/Xservers ; thencd /etc/X11/xdmawk (

38、$1 ! /#/ &$3 = /usr/X11R6/bin/X) $3 = $3 -nolisten tcp ; print Xservers Xservers.new /bin/mv Xservers.new Xservers /bin/chown root:root Xservers /bin/chmod 444 Xserversfiif -e /etc/X11/gdm/gdm.conf ; then cd /etc/X11/gdmawk -F= ($2 /X$/) printf(%s -nolisten tcpn, $0); next ; print gdm.conf gdm.conf.

39、new /bin/mv gdm.conf.new gdm.conf /bin/chown root:root gdm.conf /bin/chmod 644 gdm.conffiif -d /etc/X11/xinit ; then cd /etc/X11/xinitif -e xserverrc ; thenawk /X/ &!/#/ print $0 :0 -nolisten tcp $; next ; print xserverrc xserverrc.new /bin/mv xserverrc.new xserverrc elsecat xserverrc #!/bin/bashexe

40、c X :0 -nolisten tcp $ENDfi/bin/chown root:root xserverrc/bin/chmod 755 xserverrcfi限制只有授权用户能够访咨询at/cron讲明:cron.allow 和 at.allow 能够指定承诺运行crontab 和 at 命令的用户列表。一样直应该承诺治理员有权益运行打算任务。操作:cd /etc/bin/rm -f cron.deny at.denyecho root cron.allowecho root at.allow/bin/chown root:root cron.allow at.allow/bin/ch

41、mod 400 cron.allow at.allow限制 crontab 文件的权限讲明:系统的 crontab 文件应该只能被cron daemon(以超级用户权限运行)和 crontab 命令( SUID)。操作:/bin/chown root:root /etc/crontab/bin/chmod 400 /etc/crontab/bin/chown -R root:root /var/spool/cron/bin/chmod -R go-rwx /var/spool/cron/bin/chown -R root:root /etc/cron.*/bin/chmod -R go-rwx

42、 /etc/cron.*创建警示 BANNER讲明:创建警示 BANNER 能够对恶意攻击者或尝试者起到警示作用。操作:创建操纵台和 X 模式 BANNERif egrep -l Authorized /etc/motd = ; then echo Authorized uses only. All activity may be monitored and reported. /etc/motd fiif egrep -l Authorized /etc/issue = ; then echo Authorized uses only. All activity may be monitor

43、ed and reported. /etc/issue fiif egrep -l Authorized /etc/ = ; then echo Authorized uses only. All activity may be monitored and reported. /etc/ fi/bin/chown root:root /etc/motd /etc/issue /etc/ /bin/chmod 644 /etc/motd /etc/issue /etc/ if -e /etc/X11/xdm/kdmrc ;

44、thencd /etc/X11/xdmawk /GreetString=/ print GreetString=Authorized uses only!;next ; print kdmrc kdmrc.new /bin/mv kdmrc.new kdmrc /bin/chown root:root kdmrc /bin/chmod 644 kdmrcfiif -e /etc/X11/gdm/gdm.conf ; then cd /etc/X11/gdmawk /Greeter=/ &/gdmgreeter/ printf(#%sn, $0); next ; /#Greeter=/ & /g

45、dmlogin/ $1 = Greeter=/usr/bin/gdmlogin ; /Welcome=/ print Welcome=Authorized uses only!;next ; print gdm.conf gdm.conf.new /bin/mv gdm.conf.new gdm.conf /bin/chown root:root gdm.conf /bin/chmod 644 gdm.conffi习惯 TCP Wrappers创建“ authorized only ”的网络服务 BANNER 。 mkdir /etc/banners ; cd /etc/bannersif -

46、e /usr/doc/tcp_wrappers-7.6/Banners.Makefile ; then file=/usr/doc/tcp_wrappers-7.6/Banners.Makefile elsefile=/usr/share/doc/tcp_wrappers-7.6/Banners.Makefile ficp $file Makefileecho Authorized uses only. All activity may be monitored and reported. prototype makecd /etc/xinetd.dif -f $file ; thenawk

47、( $1 = ) print $file $file.new /bin/mv $file.new $filefi donefor file in wu-ftpd gssftp ; doif -f $file ; thenawk ( $1 = ) print banner = /etc/banners/in.ftpd ; print $file $file.new/bin/mv $file.new $filefidonefor file in rsh kshell ; doif -f $file ; thenawk ( $1 = ) print banner = /etc/banners/in.

48、rshd ; print $file $file.new /bin/mv $file.new $filefi donefor file in rlogin klogin eklogin ; doif -f $file ; thenawk ( $1 = ) print banner = /etc/banners/in.rlogind ; print $file $file.new/bin/mv $file.new $filefi ; donekshell rlogin klogin ekloginrlogin klogin eklogin创建 vsftpd 的“ authorized only”BANNERcd /etcif -d vsftpd ; thencd vsftpdfiif -e vsftpd.conf ; thenecho ftpd_banner=Authorized uses only. All activity may be monitored and reported. vsftpd.conf fi配置 xinetd 访咨询操纵讲明:配制 xinetd 使用简单的访咨询操纵和日志。操作:在 /etc/xinetd.conf 插入“ defaults”段only_from=/ /使用承诺使用

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论