SQUID在VM上运行但不透明?

这是一个slackware的虚拟机

eth0网桥从networking10.0.0.0/24上的主交换机(连接到互联网链路)接收互联网,网关为10.0.0.254,接收到的IP为10.0.0.19

eth1是使用192.168.1.0/24的内部networking,eth1的ip是192.168.1.254

路由输出-n:

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 10.0.0.254 0.0.0.0 UG 202 0 0 eth0 

我已经安装了命名(绑定),并设置转发到10.0.0.254,并使我的服务器名称服务器为192.168.1.254这似乎是工作就好了没有问题在这里。

我已经安装了鱿鱼2.7和3.1与--enable-linux-netfilteriptables的遵守规则(只发布了相关的规则,但因为它正在浏览我不相信这个问题可能在这里):

 # deny all traffic $IPT -P INPUT DROP $IPT -P FORWARD DROP $IPT -P OUTPUT DROP # Use stateful inspection feature to only allow incoming connections # related to connections I have already established myself $IPT -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT $IPT -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT $IPT -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT # allow all traffic on lo interface $IPT -A INPUT -i lo -j ACCEPT $IPT -A OUTPUT -o lo -j ACCEPT # allow squid access $IPT -A INPUT -i eth1 -p tcp --dport 3128 -m conntrack --ctstate NEW -j ACCEPT # redirect requests to squid # both rules worked just fine #$IPT -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.254:3128 $IPT -t nat -A PREROUTING -p tcp -i eth1 --dport 80 -j REDIRECT --to-port 3128 # share internet access $IPT -t nat -A POSTROUTING -o eth0 -j MASQUERADE 

这是我用于SQUID的testingconfiguration(非常默认的规则只是为了testing透明代理):

 http_port 3128 transparent hierarchy_stoplist cgi-bin ? 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 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 localhost http_access allow localnet http_access deny all always_direct allow all 

有了以上所有,我可以导航就好,但透明代理从来没有在那里,我testing通过访问此页http://stuff.dan.cx/php/testproxy.php ,如果我去直接从服务器而不使用代理一切顺利,如果我去使用代理它检测到代理服务器。

虽然我不认为下面是最好的实践,我可以使用下面的configuration隐藏代理版本2.7:

 header_access Via deny all header_access Forwarded-For deny all header_access X-Forwarded-For deny all 

问题:

  • 为什么透明代理不能在3.1.8上工作?
  • 还有什么可以validation,以find问题?

我一直在互联网上和论坛上寻找,但没有发现任何帮助我的东西。

我尝试过鱿鱼页面,但没有得到任何答案。

我刚刚发现要在3.1.8上添加什么规则,以使代理无法检测到,这对于我来说似乎更像是解决scheme,然后才是真正的透明代理方法。

我必须使用的规则是:

 request_header_access Via deny all request_header_access X-Forwarded-For deny all 

我将这个标记作为答案,因为没有人有任何想法来帮助我,但我仍然期待着如何解决这个问题,并希望能够对这个问题有帮助的input,以及如果另一个答案解决我的问题,我会把它作为答案。