Partner with experts to accelerate your digital transformation journey
Bobcares

Pi-Hole on google cloud | All About

PDF Header PDF Footer

Pi-Hole on google cloud is a DNS based adblocker. Without installing any client-side software, it protects our devices from unwanted content.

As part of our Google Cloud Platform Support Service, Bobcares responds to all inquiries, no matter how big or small they are.

Let’s look at Pi-Hole on Google Cloud in more detail.

Pi-Hole on Google Cloud

pihole on google cloud

Account Creation and Login to Google Cloud

  1. Firstly, navigate to https://cloud.google.com.
  2. Then, click Console at the top right if we have previously used Google’s Cloud Services.
  3. If this is the first time, click Try Free.
Account Creation
  1. Firstly, Accept the terms and proceed.
  2. Then, continue by creating a payment profile.

Creating a project and a compute engine

  1. Firstly, select Hamburger Menu at the top left.
  2. Then select Compute Engine.
  3. Then, choose one or more virtual machine instances.
  4. If we don’t already have one Project, make one.
  5. If we haven’t done so already, enable billing for this Project.
  6. Finally, The Compute Engine will start up.

Compute Engine Virtual Machine Setup

  1. Firstly, create a Compute Engine Virtual Machine instance.
  2. Then, customize the instance.
  3. Then, change Name to
    pihole
    .
  4. For the Free Tier, choose the closest region.
  5. Select Operating System
    Debian
    and Version
    Debian GNU/Linux 9
    (stretch) with a
    Size
    (GB) 30 Standard persistent disc under Boot Disk.
  6. Then, click the
    Network
    tab after
    expanding Management
    ,
    Security
    ,
    Disks
    ,
    Networking
    , and
    Sole Tenancy
    . Under
    Network Interfaces
    , select the Pencil icon.
  7. It’s not a good idea to use an ephemeral external IP address. To reserve a new static IP address, select
    Create IP Address
    .
  8. Then, click Create.
  9. By clicking the
    SSH
    button in a browser, we can log into the Virtual Machine via SSH. Make a mental note of the External IP address.
  10. Finally, click the
    Hamburger
    Menu in the upper left corner, then
    VPC Network
    , then
    Firewall Rules
    .

    At the top of the page, in the centre, click

    Create Firewall
    Rule.
    Allow-openvpn
    should be the rule’s name, and the Targets dropdown should be set to All instances in the network.
    0.0.0.0/0
    should be the source IP ranges. Select the
    udp
    checkbox, and the port number next to it should be changed from all to
    1194
    . After that, press the
    Create
    button. Because our server does not run any service on Port
    3389
    , we can disable the
    default-allow-rdp
    rule that Google set up with a default action of Allow. It is perfectly safe to ignore this rule. If you disable the
    default-allow-ssh firewall
    rule, the browser-based SSH in the Google Cloud Console will be disabled.

Updating & Upgrading Debian

  1. Firstly, we want to update and upgrade the Virtual Machine once we log in via SSH.
  2. Then, by running this command in the bash shell, we can ensure that we have elevated root privileges.
    sudo su
  3. Finally, run the following command in the bash shell to update and upgrade:
    apt-get update && apt-get upgrade -y

Pi-Hole Installation

  1. Firstly, run the following command in the bash shell to ensure we have elevated root privileges:
    sudo su
  2. Then, in the bash shell, run the following command to install Pi-Hole:
    curl -sSL https://install.pi-hole.net | bash

    We’ll proceed to a blue screen with a series of prompts.

    *Select OK or affirmatively for all prompts until we’re asked to select an upstream DNS provider. *Then, when asked if we want to enter a custom domain or a custom search domain, say “No.” *Then, when the question “Select Protocols” appears, IPv6 must be turned off. *Finally, for all other prompts, select OK or answer affirmatively.

  3. Set a strong password for the Web Interface that we will remember.
    pihole -a -p
  4. Then, set the
    Interface Listening Behavior
    of the Pi-Hole to local using the following command:
    pihole -a -i local
  5. Finally, at the bottom of the page, click the
    Save
    Button.

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, our Support team went over the Pi-Hole on Google Cloud in more detail.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Get featured on the Bobcares blog and share your expertise with a global tech audience.

WRITE FOR US
server management

Spend time on your business, not on your servers.

TALK TO US

Or click here to learn more.

Speed issues driving customers away?
We’ve got your back!