• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

构建网络安全长城之烽火台的建立(5)

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 20次 | 进入软件测试论坛讨论

领测软件测试网 D.测试一下PHP是否能成功运行

  [root.netserver php-4.3.3]#echo '<?php phpinfo() ?>' /www/htdocs/test.php
  [root@netserver php-4.3.3]#/www/bin/apachectl restart

  E.让apache在以运行级3、5启动的时候能够自动运行

  [root@netserver php-4.3.3]#cp apachectl /etc/init.d/httpd
  [root@netserver php-4.3.3]#chmod 755 /etc/init.d/httpd
  [root@netserver php-4.3.3]# ln -s /etc/init.d/httpd /etc/rc3.d/S85httpd
  [root@netserver php-4.3.3]# ln -s /etc/init.d/httpd /etc/rc3.d/K85httpd
  [root@netserver php-4.3.3]# ln -s /etc/init.d/httpd /etc/rc5.d/S85httpd
  [root@netserver php-4.3.3]# ln -s /etc/init.d/httpd /etc/rc5.d/K85httpd
  [root@netserver php-4.3.3]#cd ../

  然后在浏览器输入 http://该机ip地址/test.php 查看关于Apache/PHP的信息

  7、安装Snort和过滤规则

  A. 编译安装Snort

  [root@netserver ids]#groupadd snort
  [root@netserver ids]#useradd -g snort snort
  [root@netserver ids]#mkdir /etc/snort
  [root@netserver ids]#mkdir /etc/snort/rules
  [root@netserver ids]#mkdir /var/log/snort
  [root@netserver ids]#tar -xvzf snort-2.0.2.tar.gz
  [root@netserver ids]#cd snort-2.0.2
  [root@netserver snort-2.0.2]#./configure --with-mysql=/usr/local/mysql --enable-flexresp --with-libpcap-includes=/usr/local/libpcap/include --with-libpcap-libraries=/usr/local/libpcap/lib (此语句请写成一行)
  [root@netserver snort-2.0.2]#make
  [root@netserver snort-2.0.2]#make install

  B. 设置规则,我们这里为了方便,直接使用Snort自带的规则

  [root@netserver snort-2.0.2]#cp rules/* /etc/snort
  [root@netserver snort-2.0.2]#cp etc/.conf /etc/snort
  [root@netserver snort-2.0.2]#cp *.conf /etc/snort

  C.编辑snort.conf文件

  [root@netserver snort-2.0.2]#vi /etc/snort/snort.conf

  将以下几行的值改变为所写的:

  var RULE_PATH /etc/snort/rules/
  output database: log, mysql, user=snort password=(你的密码) dbname=snort host=localhost

  D.让snort在以运行级3、5启动的时候能够自动运行

  snort. (cp contrib/S99snort /etc/init.d/snort) Change the following lines:
  [root@netserver snort-2.0.2]#cp contrib/S99snort /etc/init.d/snort

  编辑snort文件,修改下面两行

  [root@netserver snort-2.0.2]#vi /etc/init.d/snort
  CONFIG=/etc/snort/snort.conf
  SNORT_GID=snort

  [root@netserver snort-2.0.2]#chmod 755 /etc/init.d/snort
  [root@netserver snort-2.0.2]#ln -s /etc/init.d/snort /etc/rc3.d/S99snort
  [root@netserver snort-2.0.2]#ln -s /etc/init.d/snort /etc/rc3.d/K99snort
  [root@netserver snort-2.0.2]#ln -s /etc/init.d/snort /etc/rc5.d/S99snort
  [root@netserver snort-2.0.2]#ln -s /etc/init.d/snort /etc/rc5.d/K99snort

  E.在MySQL中设置Snort需要的库

  [root@netserver snort-2.0.2]#/usr/local/mysql/bin/mysql
  mysql> SET PASSWORD FOR root@localhost=PASSWORD('你的root的密码');
  >Query OK, 0 rows affected (0.25 sec)
  mysql> create database snort;
  >Query OK, 1 row affected (0.01 sec)
  mysql> grant INSERT,SELECT on root.* to snort@localhost;
  >Query OK, 0 rows affected (0.02 sec)
  mysql> SET PASSWORD FOR snort@localhost=PASSWORD('你的snort的密码')
  >Query OK, 0 rows affected (0.25 sec)
  mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort@localhost
  >Query OK, 0 rows affected (0.02 sec)
  mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort
  >Query OK, 0 rows affected (0.02 sec)
  mysql> exit
  >Bye


文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网