devopsgcloudvpnsquid

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.


Solution

  • Finally I was able to find a solution for the problem I posted. Here is what I did

    I created two VMs

    1. VM A with windows server OS
    2. VM B with Linux OS and squid proxy installed

    I had two setup firewall rules for both these VMs under VPC Network in GCloud

    In VM A, I added a proxy setting in Windows to forward all calls to VM B
    In VM B, I updated the squid.conf to allow access to VM A and also to allow a set of websites that can be called from VM A and restricted all other websites.