【问题标题】:How to redirect http traffic through router/firewall to the transparent squid proxy?如何通过路由器/防火墙将 http 流量重定向到透明 squid 代理?
【发布时间】:2017-05-05 20:07:49
【问题描述】:

我在与我的 LAN 不同的网络上安装了 Squid 代理。 我在“/etc/squid3/squid.conf”中插入了“http_port 3128 transparent”,并在路由器/防火墙上添加了以下 iptable 规则:

iptables -A PREROUTING -i eth00 -p tcp -m tcp --dport 80 -j DNAT --to &IP_PROXY:3128
iptables -A PREROUTING -i eth00 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

eth00 是与我的 LAN 关联的网络接口。 路由器/防火墙位于我的 LAN、代理和互联网之间。如果可能,我不会在我的 LAN 上安装 Squid。

iptables 规则不起作用,代理无法拦截流量。

感谢任何建议。

【问题讨论】:

    标签: networking proxy router iptables squid


    【解决方案1】:

    解决了。我用“accel allow-direct”改变了“透明”,用“-s &IP_LAN”改变了“-i eth0”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-30
      • 1970-01-01
      • 1970-01-01
      • 2017-06-10
      • 1970-01-01
      相关资源
      最近更新 更多