我正在尝试使用 squid 代理设置 squidguard。它似乎没有捕获任何流量或与任何来源不匹配
套餐详情
Proxy: Squid 3.5
OS: Centos 7
SquidGuard Verion: SquidGuard V1.4
Squidguard.conf 文件
#
# CONFIG FILE FOR SQUIDGUARD
#
dbhome /usr/local/squidGuard/db
logdir /usr/local/squidGuard/logs
dest porn {
domainlist porn/domains
urllist porn/urls
}
acl {
default {
pass none
redirect http://localhost/cgi-bin/squidGuard....roup=%s&url=%u
}
}
我也尝试过这个但它也没有捕获流量
acl {
default {
pass !porn all
redirect http://localhost/cgi-bin/squidGuard....roup=%s&url=%u
}
}
Squid 状态
#systemctl status squid
â— squid.service - Squid Web Proxy Server
Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2018-08-10 11:33:25 PKT; 2min 5s ago
Docs: man:squid(8)
Process: 13438 ExecStop=/usr/sbin/squidshut.sh (code=exited, status=0/SUCCESS)
Process: 13464 ExecStart=/usr/sbin/squid -sYC (code=exited, status=0/SUCCESS)
Process: 13461 ExecStartPre=/usr/bin/chown squid.squid /var/run/squid (code=exited, status=0/SUCCESS)
Process: 13458 ExecStartPre=/usr/bin/mkdir -p /var/run/squid (code=exited, status=0/SUCCESS)
Main PID: 13467 (squid)
Memory: 16.0M
CGroup: /system.slice/squid.service
├─13465 /usr/sbin/squid -sYC
├─13467 (squid-1) -sYC
├─13468 (logfile-daemon) /var/log/squid/access.log
└─13469 (squidGuard) -c /usr/local/squidGuard/squidGuard.conf
Aug 10 11:33:25 filter squid[13467]: Finished loading MIME types and icons.
Aug 10 11:33:25 filter squid[13467]: HTCP Disabled.
Aug 10 11:33:25 filter squid[13467]: Squid plugin modules loaded: 0
Aug 10 11:33:25 filter systemd[1]: squid.service: Supervising process 13467 which is not our child. We'll most likely not notice when it exits.
Aug 10 11:33:25 filter squid[13467]: Adaptation support is off.
Aug 10 11:33:25 filter systemd[1]: Started Squid Web Proxy Server.
Aug 10 11:33:25 filter squid[13467]: Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 13 flags=9
Aug 10 11:33:25 filter squid[13467]: storeLateRelease: released 0 objects
Aug 10 11:33:35 filter squid[13467]: Starting new redirector helpers...
Aug 10 11:33:35 filter squid[13467]: helperOpenServers: Starting 1/20 'squidGuard' processes
squidguard 测试
# echo "http://www.example.com 10.0.0.1/ - - GET" | squidGuard -c /usr/local/squidGuard/squidGuard.conf -d
2018-08-10 11:41:07 [13474] New setting: dbhome: /usr/local/squidGuard/db
2018-08-10 11:41:07 [13474] New setting: logdir: /usr/local/squidGuard/logs
2018-08-10 11:41:07 [13474] init domainlist /usr/local/squidGuard/db/porn/domains
2018-08-10 11:41:07 [13474] loading dbfile /usr/local/squidGuard/db/porn/domains.db
2018-08-10 11:41:07 [13474] init urllist /usr/local/squidGuard/db/porn/urls
2018-08-10 11:41:07 [13474] loading dbfile /usr/local/squidGuard/db/porn/urls.db
2018-08-10 11:41:07 [13474] squidGuard 1.4 started (1533883267.197)
2018-08-10 11:41:07 [13474] squidGuard ready for requests (1533883267.205)
2018-08-10 11:41:07 [13474] source not found
2018-08-10 11:41:07 [13474] no ACL matching source, using default
http://localhost/cgi-bin/squidGuard....ww.example.com 10.0.0.1/- - -
2018-08-10 11:41:07 [13474] squidGuard stopped (1533883267.206)
在 squid.conf 中重定向 squidGuard
url_rewrite_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf
我的请求与 squidguard 中的任何过滤器/源都不匹配。
请帮助我正确设置 squidguard 过滤器