博客
关于我
Squid服务器ACL与日志分析
阅读量:376 次
发布时间:2019-03-04

本文共 1779 字,大约阅读时间需要 5 分钟。

Squid???ACL?????????

Squid????ACL????

Squid??????????????????????????ACL?????????????ACL???????????????????????????????????????????????

ACL??????

  • ????????

    ACL????????

    acl ???? ???? ????
    • ????????????????
    • ???????src??????dst???????port?????domain???????time??????maxconn????????url_regex?URL????????urlpath_regex?URL????????
  • ??????

    ??http_access??????ACL??????

    http_access allow ???http_access deny ???
    • ???????????Squid????????????
    • ???????Squid???????????????????
    • ?????deny??????allow???????allow all?deny all?
  • ????

    ???1????????????????

    acl aaa src 192.168.100.0/24http_access deny aaa

    ???2?????????????????

    acl aaa src 192.168.100.0/24acl bbb time MTWHF 08:30-17:30http_access allow aaa bbbhttp_access deny aaa

    ???3?????????????

    acl ccc dst "/tmp/ipblock.list"acl ddd dstdomain "/tmp/dmblock.list"http_access deny ccchttp_access deny ddd

    Squid????

    SARG?Squid Analysis Report Generator??????Squid???????????????????????SARG?????????

    ??SARG

  • ??GD?

    ??YUM???

    yum -y install gd gd-devel
  • ??SARG

    - ?????

    tar zxvf sarg-2.3.7.tar.gz

    - ?????

    ./configure --prefix=/usr/local/sarg --sysconfdir=/etc/sarg --enable-extraprotectionmakemake install

    - ??????

    echo "access_log /usr/local/squid/var/logs/access.log" > /etc/sarg/sarg.confecho "title \"Squid User Access Reports\"" >> /etc/sarg/sarg.confecho "output_dir /var/www/html/sarg" >> /etc/sarg/sarg.conf
  • ??SARG

    sarg
  • ???????

  • #!/bin/bashTD=$(date +%d/%M/%Y)YETD=$(date -d '1 day ago' +%d/%M/%Y)/usr/local/sarg/bin/sarg --log /usr/local/squid/var/logs/access.log --output /var/www/html/sarg --zone --daily $YETD-$TD > /dev/nullexit 0

    - ?????????   ```bash   chmod +x /usr/local/sarg/daily.sh
    • ?????????
    crontab -e00 00 * * * /usr/local/sarg/daily.sh

    ????

    • ????
      ??Squid?????
      tail -3 /usr/local/squid/var/logs/access.log
    • ????
      ?????????URL???????????

    转载地址:http://hibg.baihongyu.com/

    你可能感兴趣的文章
    oracle avg、count、max、min、sum、having、any、all、nvl的用法
    查看>>
    Oracle BEQ方式连接配置
    查看>>
    oracle Blob保存方式,oracle 存储过程操作blob
    查看>>
    Oracle BMW Racing sailing vessel帆船图
    查看>>
    ORACLE Bug 4431215 引发的血案—原因分析篇
    查看>>
    Oracle cmd乱码
    查看>>
    Oracle Corp甲骨文公司推出Oracle NoSQL数据库2.0版
    查看>>
    oracle dblink 创建使用 垮库转移数据
    查看>>
    oracle dblink结合同义词的用法 PLS-00352:无法访问另一数据库
    查看>>
    Oracle dbms_job.submit参数错误导致问题(ora-12011 无法执行1作业)
    查看>>
    oracle dg switchover,DG Switchover fails
    查看>>
    Oracle E-Business Suite软件 任意文件上传漏洞(CVE-2022-21587)
    查看>>
    Oracle EBS OPM 发放生产批
    查看>>
    Oracle EBS-SQL (BOM-15):检查多层BOM(含common BOM).sql
    查看>>
    Oracle EBS环境下查找数据源(OAF篇)
    查看>>
    oracle Extract 函数
    查看>>
    uni-app开发环境自动部署的一个误区(App running at...)
    查看>>
    Oracle GoldenGate Director安装和配置(无图)
    查看>>
    oracle instr函数详解
    查看>>
    Oracle Java所有版本的下载链接
    查看>>