RouterOS文档展示了如何通过内置到RouterOS中的HTTP透明地代理所有web流量:
/ip firewall nat
add in-interface=ether1 dst-port=80 protocol=tcp action=redirect to-ports=8080 chain=dstnat
/ip proxy
set enabled=yes port=8080我想在另一台机器上运行一个代理,这样我就可以利用Squid等中更复杂的过滤规则。但是,如果我使用NAT将流量重定向到运行Squid的另一台机器,它将无法工作,因为HTTP请求需要重写才能成为代理HTTP请求;仅仅重定向流量会从Squid中产生错误的请求错误。
发布于 2010-09-16 08:23:36
它可以通过parent-proxy设置来完成:
/ip proxy
set parent-proxy=<IP of Squid machine> parent-proxy-port=3128发布于 2010-09-16 11:19:52
不需要在RouterOS中设置代理。您可以通过NAT直接将所有传出HTTP流量路由到服务器:
ip firewall nat add in-interface=eth1 src-address=!<IP of Squid machine> dst-port=80 protocol=tcp action=dst-nat to-addresses=<IP of Squid machine> to-ports=8080 最后一个参数“src-address=!”需要使用什么样的squid机器通过与其他机器相同的接口进行通信。否则就会这样:
发布于 2013-06-22 05:38:27
/ip proxy
set parent-proxy=<IP of Squid machine> parent-proxy-port=3128
/ip firewall nat
chain=dstnat src-address=!<IP of Squid machine> protocol=tcp dst-port=80 src-address-list=<IP of Local machine> action=redirect to-ports=8080https://serverfault.com/questions/181703
复制相似问题