|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
范例文件如下: # # hosts.allow This file describes the names of the hosts which are # allowed to use the local INET services, as decided # by the \\\'/usr/sbin/tcpd\\\' server. # ALL : 202.112.13.0/255.255.255.0 ftpd: 202.117.13.196 in.telnetd: 202.117.48.33 ALL : 127.0.0.1 在这个文件中,网段202.112.13.0/24可以访问linux系统中所有的网络服务,主机202.117.13.196只能访问ftpd服务,主机202.117.48.33只能访问telnetd服务.本机自身可以访问所有网络服务. 在/etc/hosts.deny文件中禁止所有其他情况: #/etc/hosts.deny ALL : DENY : spawn (/usr/bin/finger -lp @%h | /bin/mail -s "Port Denial noted in %d-%h" root) 在/etc/hosts.allow中,定义了在所有其他情况下,linux所应该执行的操作.spawn选项答应linux系统在匹配规则中执行指定的shell命令,在我们的例子中,linux系统在发现无授权的访问时,将会发送给超级用户一封主题是"Port Denial noted in %d-%h"的邮件,在这里,我们先要介绍一下allow和deny文件中的变量扩展. (4)/etc/issue和/etc/issue.net 在我们登录linux系统中的时候,我们经常可以看到我们linux系统的版本号等敏感信息.在如今的网络攻击行为中,许多黑客首先要收集目标系统的信息,版本号等就是十分重要的信息,所以在linux系统中一般要把这些信息隐藏起来./etc/issue和/etc/issue.net就是存放这些信息的文件.我们可以修改这些文件来隐藏版本信息. 另外,在每次linux重新启动的时候,都会在脚本/etc/rc.d/rc.local中再次覆盖上面那两个文件./etc/rc.d/rc.local文件的范例如下: # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don\\\'t # want to do the full Sys V style init stuff. if [ -f /etc/redhat-release ]; then R=$(cat /etc/redhat-release) arch=$(uname -m) a="a" case "_$arch" in _a*) a="an";; _i*) a="an";; esac NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat` if [ "$NUMPROC" -gt "1" ]; then SMP="$NUMPROC-processor " if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then a="an" else a="a" fi fi # This will overwrite /etc/issue at every boot. So, make any changes you # want to make to /etc/issue here or you will lose them when you reboot. #echo "" > /etc/issue #echo "$R" >> /etc/issue # echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue cp -f /etc/issue /etc/issue.net echo >> /etc/issue 在文件中黑体的部分就是得到系统版本信息的地方.一定要将他们注释掉. (5)其他配置 在普通微机中,都可以通过ctl+alt+del三键的组合来重新启动linux.这样是十分不安全的,所以要在/etc/inittab文件中注释该功能: # Trap CTRL-ALT-DELETE #ca::ctrlaltdel:/sbin/shutdown -t3 -r now 返回类别: 教程 上一教程: 茅塞顿开:给FREEBSD新手的一些建议 下一教程: LINUX 常用命令(用户有关) 您可以阅读与"LINUX系统中网络配置详解[11]"相关的教程: · LINUX系统中网络配置详解[3] · LINUX系统中网络配置详解[5] · LINUX系统中网络配置详解[9] · LINUX系统中网络配置详解[8] · LINUX系统中网络配置详解[10] |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |