GithubHelp home page GithubHelp logo

Create a DNS for just me minus VPN about pi-hole-pivpn-on-google-compute-engine-free-tier-with-full-tunnel-and-split-tunnel-openvpn-configs HOT 5 CLOSED

rajannpatel avatar rajannpatel commented on May 14, 2024
Create a DNS for just me minus VPN

from pi-hole-pivpn-on-google-compute-engine-free-tier-with-full-tunnel-and-split-tunnel-openvpn-configs.

Comments (5)

doodlemania2 avatar doodlemania2 commented on May 14, 2024 1

Brilliant!

from pi-hole-pivpn-on-google-compute-engine-free-tier-with-full-tunnel-and-split-tunnel-openvpn-configs.

rajannpatel avatar rajannpatel commented on May 14, 2024

Yes, this is possible. Do you have a static IP? It is important to do this very carefully, because creating a public DNS resolver is frowned upon, open dns resolvers can be the targets of cache poisoning attacks.

from pi-hole-pivpn-on-google-compute-engine-free-tier-with-full-tunnel-and-split-tunnel-openvpn-configs.

doodlemania2 avatar doodlemania2 commented on May 14, 2024

Yes, I'd want to do this and restrict on the server side to only my IP ranges.

from pi-hole-pivpn-on-google-compute-engine-free-tier-with-full-tunnel-and-split-tunnel-openvpn-configs.

rajannpatel avatar rajannpatel commented on May 14, 2024

This is how you would do it. Follow these portions of the guide:

  • Google Cloud Login and Account Creation
  • Compute Engine Virtual Machine Setup
  • Debian Update & Upgrade
  • Pi-Hole Installation

After completing the Pi-Hole Installation step, go to http://your-external-ip/admin/settings.php?tab=dns and click Settings and navigate to DNS. Under Interface Listening Behavior you want to choose the 3rd radio button: Listen on all interfaces, permit all origins. I want to bring your attention to the warning here:

this option should not be used on devices which are directly connected to the Internet. This option is safe if your Pi-hole is located within your local network, i.e. protected behind your router, and you have not forwarded port 53 to this device. In virtually all other cases you have to make sure that your Pi-hole is properly firewalled.

To ensure everything is properly firewalled:

  1. Log into Google Cloud Console: https://console.cloud.google.com/
  2. Ensure your Project is selected in the blue bar at the top (next to the words "Google Cloud Console); by default it should be
  3. Click the Hamburger Menu at the top left, click VPC Network and click Firewall Rules
  4. Click default-allow-http in the table
  5. Click Edit at the top of the page
  6. Add the static IP address from the location you plan on accessing Pi-Hole from, this is going to protect your admin panel
  7. Click the Save button
  8. Click the Hamburger Menu at the top left, click VPC Network and click Firewall Rules
  9. Click Create Firewall Rule at the top of the page
  10. Set the Name to allow-dns, set your static IP address from the location you plan on making your DNS queries from under Source filter, and enable both the tcp and udp checkboxes. In the Input field beside tcp: write 53, and in the Input field beside udp: write 53.
  11. Click Save.

You can use "your-external-ip" that Google Compute Engine has assigned to you as your DNS server now. You will not be able to use the Private DNS Server option on Android 9, even if you map a hostname to the Google Compute Engine IP address, because your cellular provider will not give you a static IPv4 address on your mobile phone. You can define the DNS server on WiFi networks, however.

Feel free to close this issue if this answers your question, happy to elaborate further if needed.

from pi-hole-pivpn-on-google-compute-engine-free-tier-with-full-tunnel-and-split-tunnel-openvpn-configs.

rajatpatel92 avatar rajatpatel92 commented on May 14, 2024

@rajannpatel - First of all thanks for your awesome guide! Superb work!

In addition to what is discussed in this issue, I was just wondering if one can possibly setup an OpenVPN server on home router and connect GCP VM with PiHole to it using OpenVPN client & use its IP as DNS server?

I have just basic networking knowledge so don't know whether this would be a recommended way to do it, though I would really love to have your inputs on this.

from pi-hole-pivpn-on-google-compute-engine-free-tier-with-full-tunnel-and-split-tunnel-openvpn-configs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.