Score:-1

How do I make Google Compute Engine based domain private use only?

kr flag

I've been using a compute-engine to host a website on gcloud. I just can't figure out how to make access to the project private, with a whitelist for pre-approved emails.

Score:0
dz flag
Pit

Developing the above answer:

The Identity-Aware Proxy will allow you to Use identity and context to guard access to your applications and VMs.

Your use case would be setting up IAP for Compute Engine, which has a few requirements, like having a HTTPS load balancer .

If you just want to allow specific users to access your website there are some alternatives:

  • Install a plugin to restrict access, for example this one.

  • Restrict GCP Instance's traffic access through Firewall rules. This is not recommended because you will need fixed IP addresses for the users, or they should use a VPN to always connect from same fixed IP address.

  • You could whitelist IP's from the web server side program, for example for Apache whitelist or Nginx whitelist

By doing this the website will still be publicly available but only allowed users could access the website and modify it or access private content of the website.

Score:0
jp flag

Editing the answer based on comment.

You can use IAP ( Identity Aware Proxy) to control who can or cannot access your public website 1. Enabling IAP for GCP VM instance

Moudy Hasan avatar
kr flag
Hi, so essentially the website is currently viewable to the public. I've got a generic VM made with a wordpress website, and I'd like to restrict access so that only people who have a role that i've created for their email can access it
Krish avatar
jp flag
Edited the answer based on your comment
John Hanley avatar
cn flag
@MoudyHasan WordPress supports user authentication. Require uses to login. There are numerous plugins enhancing authentication: https://auth0.com/wordpress
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.