|
1
|
|
ryd994Aug 7, 2015
2
http_port 3129 intercept(别listen外网,那是找抽,同时做好防火墙保护)
iptables -t nat -A PREROUTING j DNAT --to-destination 内网地址:端口 另外,这种问题难道不是RTFM么 |
|
4
iptables -t nat -A PREROUTING -p tcp -s 内网网段 --dport 80 -j DNAT --to-destination 内网地址:3129
不好意思,忘了 |
|
6
他这里开始会做一个路由选择 |
|
ryd994Aug 7, 2015
10
|
|
12
会出现一个死循环
|
|
13
iptables -t nat -A OUTPUT-p tcp -s 内网网段 --dport 80 -m owner --uid-owner squid用户(一般系统默认是squid,ps aux看一下) -j DNAT --to-destination 内网地址:3129
实在抱歉,平时都是在路由上部署,没注意这个问题 |
|
ryd994Aug 7, 2015
14
错了,反了
iptables -t nat -A OUTPUT-p tcp -s 内网网段 --dport 80 -m owner ! --uid-owner squid用户(一般系统默认是squid,ps aux看一下) -j DNAT --to-destination 内网地址:3129 |
|
18
@ryd994 iptables -t nat -A OUTPUT-p tcp -s 内网网段 --dport 80 -m owner ! --uid-owner squid用户(一般系统默认是squid,ps aux看一下) -j DNAT --to-destination 内网地址:3129
你这个确实是实现了将本地产生的80请求定向到3128的squid上面 但是到squid上之后,squid也是本机的程序,所以就会出现squid去访问你请求的网站,还是会匹配这条 |
|
20150517Aug 8, 2015 via Android
21
我没看整个帖子,但squid新版本不能用iptables来转了
|