Quantcast
Channel: C++博客-所有随笔
Viewing all articles
Browse latest Browse all 7881

ubuntu 13.04 squid iptables 单网卡透明内网代理

$
0
0

apt-get install squid

vim /etc/squid3/squid.conf

 

visible_hostname ksproxy

http_access allow all

http_port 3128 transparent

 

/etc/init.d/squid3 restart

 

echo "1" >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 3128

这个放到rc.local里面即可。

 

日志:

/var/log/squid3/



AlanTop 2013-05-03 14:24 发表评论

Viewing all articles
Browse latest Browse all 7881

Trending Articles