tcp_wrap

Normal07.8 磅02falsefalsefalseMicrosoftInternetExplorer4 tcp_wrap 验证,所涉及的两个配置文件

vim /etc/hosts.allow

vim /etc/hosts.deny

规则先allowdeny

[root@up_server chroot]# cat /etc/hosts.allow

#

# 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.

#

vsftpd:192.168.1.0/24 EXCEPT 192.168.1.254

Sshd102.134.132.34

[root@up_server chroot]#

我来说一下host.allowhost.deny的用处。

对于能过xinetd程序启动的网络服务,比如ftp telnet,我们就可以修改/etc/hosts.allow/etc/hosts.deny的配制,来许可或者拒绝哪些IP、主机、用户可以访问。

比如我们在/etc/hosts.allow中加入
all:218.24.129.
这样就会允许来自218.24.129.*域的所有的客户来访问。这只是举个例子,实际上,系统默认状态 下,都是能用这些网络服的

如果我们在/etc/hosts.deny中加入,就限制了来自218.24.129.*域的所有的所有的IP
all:218.24.129.

如果我们在/etc/hosts.deny中加入
all:218.24.129.134
,这样就限制了所有在218.24.129.134中的所有的用户的访问。

hosts.allow host.deny相冲突时,以hosts.allow设置优化。

设置好后,要重新启动
# /etc/rc.d/init.d/xinetd restart
# /etc/rc.d/init.d/network restart

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23168012/viewspace-1052662/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23168012/viewspace-1052662/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值