简体   繁体   中英

How to connect to external proxy on port 3459 from GCP VM Instance?

I have a proxy server which accepts connections on port 3459. When I am trying to connect to it from my local computer, I am able to connect. To test I ran this command in terminal:

curl --proxy http://proxy_url:3459 --proxy-user user:password -L icanhazip.com

When I tried to run the same in a GCP Compute Engine VM instance which lies in a non-default VPC (named testing-vpc ), I'm unable to connect to the proxy. I have created a firewall rule to open port 3459 by following command:

gcloud compute firewall-rules create proxy-allow-egress-port3459 \
  --network testing-vpc \
  --action allow \
  --direction egress \
  --rules tcp:3459 \
  --destination-ranges 0.0.0.0/0 \
  --priority 10 \
  --target-tags testing-proxy

and attached the tag testing-proxy in my instance. Still, its not working. Please let me know what am I missing here.

您正在创建一个出口(-方向出口)规则,而您需要一个入口规则以允许发往GCE实例的入站连接。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM