Squid3用户进行身份验证但没有数据服务器

时间:2014-09-23 11:38:34

标签: linux debian squid

大家好!

我在Wheezy回购中使用Debian 7运行Squid 3.1。

用户可以对发送的身份验证和请求进行身份验证,但是浏览器中没有显示页面,这些页面永远都是白屏加载。 :(

我的日志文件给出: Stackoverflow不会让我发布这个,因为它认为我发布链接,我缺乏声誉点。

我的配置是:

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 SSL_ports port 443 8443 563 22   # https, snews, ssh
acl SSL_ports port 4443         # rsync
acl SSL_ports port 873          # rsync
acl Safe_ports port 80 81 82 800 8119          # http
acl Safe_ports port 4443 873    # rsync
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 Safe_ports port 631         # cups
acl purge method PURGE
acl CONNECT method CONNECT
auth_param digest program /usr/lib/squid3/digest_pw_auth -c /etc/squid3/passwords
auth_param digest realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow manager localhost
http_access allow authenticated
http_access deny manager
#http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_port 3128 transparent
forwarded_for delete
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

我删除了用于测试的端口的denys:     http_access拒绝!Safe_ports     http_access拒绝CONNECT!SSL_ports

这可能与IP6分辨率有关,因为我的DNS将解析IP6地址,但ping不会ping!

在squid日志文件中:DIRECT / 2a01:111:f400:9814 :: 6 并且ip5 ping失败。

# ping6 -n ipv6.google.com
PING ipv6.google.com(2607:f8b0:4005:802::1000) 56 data bytes
^C
--- ipv6.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2000ms

如果有人给我一些帮助,我会非常感激吗?

亲切的问候, 柔

1 个答案:

答案 0 :(得分:1)

问题是DNS解析了IP6地址,但我的VPS服务器没有IP6地址,因此squid使用IP6并且不会回退到IP4。

可以通过添加我的squid.conf来强制使用IP4:

tcp_outgoing_address 123.123.123.123

其中123.123.123.123是您要使用的传出IP4地址。

鱿鱼现在有效。