我与调制解调器sagem (NAT)有一个ADSL连接,并将一台机器连接到电缆>(fedora17 = 192.168.1.2)到这台我安装了oracle的机器上,在这台机器中,我>将两台机器连接成网络连接到调制解调器Sagem (Debian "192.168.1.6“as >server + Ubuntu "192.168.1.7”作为客户端),我安装了squid和squidGuard the client >on (Debian)。
在这个服务器(Debian)中,下面是我的配置:
##cat /proc/sys/net/ipv4/ip_forward
1
##ls -l /etc/
..
..
lrwxrwxrwx ......squid -> squid3/
..
..
##cd /etc/squid/
ls -l
-rw-r--r-- 1 root root 1547 6 janv. 2012 errorpage.css
-rw-r--r-- 1 root root 421 6 janv. 2012 msntauth.conf
lrwxrwxrwx 1 root root 6 4 févr. 21:49 squid -> squid/
-rw-r--r-- 1 root root 198835 5 févr. 00:02 squid.conf
-rw-r--r-- 1 root root 198764 2 févr. 00:18 squid.conf.old
-rw-r--r-- 1 root root 1350 4 févr. 23:47 squidGuard.conf
-rw-r--r-- 1 root root 1431 3 févr. 20:25 squidGuard.conf.old/etc/squid3 3/squid.conf
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 192.168.1.0/24
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid3/access.log squid
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname mysrvhostname/etc/squid3 3/squidGuard.conf
time workhours {
weekly mtwhf 08:00 - 16:30
date *-*-01 08:00 - 16:30
}
dest noface
{
domainlist noface/domains
expressionlist noface/expressions
urllist noface/urls
}
acl {
default {
pass !noface all
redirect http://www.google.tn/
}
}/var/lib/squidGuard/db/noface/域
facebook.com
free.com
speedtest.com/var/lib/squidGuard/db/noface/urls
http://www.facebook.com/
https://www.facebook.com//var/lib/squidGuard/db/noface/domains.diff
+facebook.com
-debian.orgiptables规则
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128我构建了数据库,并像这样启动了squid3:
# squidGuard -C all
# squidGuard -u
# /etc/init.d/squid3 restart现在,在我的客户端Ubuntu中,我在强制代理和端口3128中设置了我的服务器Debian 192.168.1.6的IP地址,当我访问其中一个站点时,我想毫不费力地阻止facebook作为客户加入
问题出在哪里?
发布于 2013-02-05 08:28:57
问题是,您没有引用任何地方都看不到的SquidGuard。您将需要一个redirect_program子句,指向SG二进制文件和配置。
redirect_program /usr/bin/SquidGuard -c /etc/squid/SquidGuard.conf只要检查SG二进制文件的路径,我就不确定了。
https://serverfault.com/questions/475434
复制相似问题