我有我的服务器上安装了Ubuntu 14.04 LTS服务器,我想在我的服务器上安装透明代理服务器LANnetworking。 请帮我解决一下这个。
提前致谢。
这是非常简单的,因为你已经有一个带有2个NIC的Ubuntu机器 – 你只需要安装或多或less的Squid; networking中的所有机器都必须使用Squid盒作为默认网关; 然后添加以下内容到鱿鱼configuration:
# port configuration http_port 3126 intercept https_port 3127 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/opt/qlproxy/etc/myca.pem http_port 3128 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/opt/qlproxy/etc/myca.pem
最后,使用iptables从端口80 – > 3126,443 – > 3129redirect传入stream量:
# redirect all HTTP(tcp:80) traffic coming in through eth0 to 3126 iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3126 # redirect all HTTPS(tcp:443) traffic coming in through eth0 to 3127 iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 3127
启用NAT,你很好走。 更多信息,请访问http://blog.diladele.com/2014/04/10/transparent-ssl-https-filtering-on-centos/
在http://docs.diladele.com/tutorials/transparently_filtering_https_centos/index.html上使用CentOS 7上的FirewallD更简单