【发布时间】:2020-02-19 09:53:00
【问题描述】:
我是 Google Cloud 的新手,所以我可能解释不准确。\ 我在 Google Cloud Platform 上安装了带有 Ubuntu 18.04 的 VM,并在其上安装了 Squid 3 代理服务器。 代理已经配置了一点。
http_port 3128 transparent
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 2
auth_param basic realm My Proxy Server
auth_param basic credentialsttl 24 hours
auth_params basic casesensitive off
#add acl rules
acl users proxy_auth REQUIRED
#http access rules
http_access deny !users
http_access allow users
在 Google 控制台中,我可以看到服务器的外部 IP 地址,但它无法通过它工作。
ifconfig 命令显示下一个
ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 10.156.0.3 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80::4001:aff:fe9c:3 prefixlen 64 scopeid 0x20<link>
ether 42:01:0a:9c:00:03 txqueuelen 1000 (Ethernet)
RX packets 104399 bytes 83418274 (83.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 93840 bytes 12598292 (12.5 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 16697 bytes 1149429 (1.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16697 bytes 1149429 (1.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
其中 inet 10.156.0.3 表示我的内部 IP。 我想我不明白使用 Google 平台或仅使用代理配置的一些简单工作规则。
你能告诉我哪里错了吗? 谢谢。
【问题讨论】:
-
您是否在防火墙上打开了端口 3128 以使连接到您的虚拟机成为可能?
-
我好像没有。感谢您的提示,我现在会检查它。
-
我在回答中提供了更多详细信息。如果您解决了问题,请将其标记为已接受。
标签: google-cloud-platform google-compute-engine ubuntu-18.04 http-proxy squid