ubuntu安装squid做http代理服务器不成功求解答
sudo apt-get install squid
sudo vim /etc/squid3/squid.conf
修改为http_access allow all, 端口保持默认
service squid3 restart
环境: aliyun ubuntu x64 lamp
用chrome switchysharp连接代理,无法打开页面:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
新入手一国外VPS,打算部署squid做http代理服务器来穿墙,据说近来墙越发坚固了,不知还能不能穿墙?有哪位部署并成功穿Q吗?谢谢相告!
是的,肯定是你启动squid的时候没有启动成功,看日志去吧
回复
啊啊就是看不出来。。。
@realanan 麻烦再看下,这个是不是代表3129端口没有在监听?
root@AY140713160716893375Z:~# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN
tcp 0 0 121.41.129.112:8888 106.46.97.195:19966 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:12204 ESTABLISHED
tcp 0 0 121.41.129.112:8888 124.128.130.77:51989 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:40368 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:42281 ESTABLISHED
tcp 0 388 121.41.129.112:22 180.153.253.134:63270 ESTABLISHED
tcp 0 0 121.41.129.112:8888 124.128.130.77:50821 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:2440 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:5020 ESTABLISHED
tcp 0 0 121.41.129.112:8888 124.128.130.77:50509 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:33982 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:2236 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:41497 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:2237 ESTABLISHED
tcp 0 0 121.41.129.112:8888 124.128.130.77:65393 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:11383 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:30808 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:50288 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:30809 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:43028 ESTABLISHED
tcp 0 0 121.41.129.112:49836 42.156.166.25:80 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:7598 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:57901 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:58744 ESTABLISHED
tcp 0 0 121.41.129.112:8888 106.46.97.195:12203 ESTABLISHED
tcp6 0 0 :::22 :::* LISTEN
udp 0 0 121.41.129.112:123 0.0.0.0:*
udp 0 0 10.162.84.28:123 0.0.0.0:*
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
udp6 0 0 :::123 :::*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] SEQPACKET LISTENING 6694 /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 6514 @/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 7518 /var/run/dbus/system_bus_socket
unix 4 [ ] DGRAM 7557 /dev/log
unix 2 [ ACC ] STREAM LISTENING 7619 /var/run/nscd/socket
unix 2 [ ] DGRAM 4941070
unix 2 [ ] DGRAM 8904
unix 3 [ ] STREAM CONNECTED 7545 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7544
unix 3 [ ] STREAM CONNECTED 7527
unix 3 [ ] STREAM CONNECTED 7526
unix 3 [ ] STREAM CONNECTED 7129 @/com/ubuntu/upstart
unix 3 [ ] STREAM CONNECTED 7127
unix 3 [ ] DGRAM 6741
unix 3 [ ] DGRAM 6740
unix 3 [ ] STREAM CONNECTED 6662 @/com/ubuntu/upstart
unix 3 [ ] STREAM CONNECTED 6647
目前看不出什么问题。给你一些排查思路: 1. 在服务器上执行netstat -an 查看3129端口是否已经LISTEN 2. 在自己机器上用telnet访问以下服务器的3129端口,看看能否连上,能连上的话在里面输入一些HTTP头试试有没有反应。 3. 看一下squid的日志文件
@realanan 麻烦看下哦
root@AY140713160716893375Z:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:8888
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
是3128,不行我才改的,改了还是不行
@螳螂哥哥 把配置文件贴出来看看,还有检查下ubuntu的iptables有没有开
回复
如何检查iptables开启?
@螳螂哥哥 命令行输入iptables -L,有内容的看下代理的端口是不是被屏蔽了,没内容的话请贴squid的配置文件
回复
两个都贴拉
默认端口不是3128吗?3129是管理端口吧