7、/etc/hosts.allow, /etc/hosts.deny 格式
[root@www ~]# vim /etc/hosts.deny
rsync : 127.0.0.100 127.0.0.200 : deny
或
[root@www ~]# vim /etc/hosts.deny
rsync : 127.0.0.100 : deny
rsync : 127.0.0.200 : deny
/etc/hosts.allow 的设定优先于 /etc/hosts.deny,如果两个文件都没有,则表示不经过此防火墙,即接受。
ALL:代表全部的 program_name 或者是 IP 都接受的意思,例如 ALL: ALL: deny
LOCAL:代表来自本机的意思,例如: ALL: LOCAL: allow
UNKNOWN:代表不知道的 IP 或者是 domain 或者是服务时;
KNOWN:代表为可解析的 IP, domain 等等资讯时。
如:[root@www ~]# vim /etc/hosts.deny
rsync: ALL
8、TCP Wrappers 特殊功能:当有其他人扫瞄我的 rsync port 时,我就将他的 IP 记住,以做为未来的查询与认证之用
需要安装了 TCP Wrappers 软体才行。要确定有没有安装 TCP Wrappers 可以使用‘ rpm -q tcp_wrappers ’来查询。具体用法见其他资料。
9、查看系统启动哪些服务:netstat -tanlp
查看所有服务状态:service --status-all
查看开机启动服务:chkconfig --list |more
打开开机启动服务:chkconfig deamon_name on
10、把自己的服务放入chkconfig来管理:chkconfig [--add|--del] [服务名称]
a、自建的服务要放入/etc/init.d/
b、服务脚本的内容要写上:# chkconfig: 35 80 70
c、chkconfig --add 服务名
