'Allowing external internet access through a proxy

Setup: Created VM A with squid proxy installed on an static external IP. Created another VM B. This VM also has its own external static IP.

Now I want to restrict internet access on VM B and all calls from that VM should be proxied to VM A.

I have this setup in GCloud, what would be the best way to make this work.

I have referred a couple of articles on GCloud but most of the examples have this setup within a VPC network and that can be managed through the internal IPs.

Any recommendations on this would be highly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source