Forever free pihole blocking on google cloud compute

badsector

Supremacy Member
Joined
Mar 10, 2001
Messages
6,525
Reaction score
59
Thanks for pointing this out. I will try Alook browser on our iOS devices.

My openwrt experiment does not go far away enough -- only installed on my Linksys WRT1900AC and TP-Link RE350 (limited RAM so just worked as a wireless bridge). I will experiment with the WRT1900AC more.

But indeed I should get an x86 based mini PC to try out openwrt and pfsense...

Not so sure if I should take risk and go with the following, tempting because of 4 ports 2.5Gbe.

https://m.tb.cn/h.4YME4E3?sm=d01b69
【Intel Gemini lake J4125 4口2.5G软路由V2.0版本】

BTW, so far I have not yet appreciate the benefits of Adguard Home versus Pi-Hole yet. I will try it on the Cloud first.

The comparison from Adguard itself is probably a bit biased.
https://kb.adguard.com/en/home/overview

i've not tried both. haha
i'm using openclash and add only simple rules for adblocking

tat minipc looks good. better double check ur Virtual machine has driver support for their 2.5Gbe chip.

J4125 might seems powerful to u now. but if u install more OS in ur VM?
or if ur openwrt install docker? high playability :s13:
 

CleanAir

Junior Member
Joined
Sep 13, 2019
Messages
30
Reaction score
0
Hi anyone able to advice?

- Using Asus router & GCP for pi-hole

1. i am able to access the pi-hole website.
2. I tried to add the pi-hole ip address to my asus router, it seems like the WAN connection will cut off.
3. I tried using wireguard via my phone & laptop, it works.

Anyone knows why when i enter the pi-hole ip address to router, it dont work..
 

yusoffb01

Arch-Supremacy Member
Joined
Jun 17, 2008
Messages
16,893
Reaction score
1,799
Hi anyone able to advice?

- Using Asus router & GCP for pi-hole

1. i am able to access the pi-hole website.
2. I tried to add the pi-hole ip address to my asus router, it seems like the WAN connection will cut off.
3. I tried using wireguard via my phone & laptop, it works.

Anyone knows why when i enter the pi-hole ip address to router, it dont work..

see first post.

firewall ports allowed?
set secondary dns?
permit all origins?

use the default blocklists first. the ones that bring it to a few million requires whitelisting
 

CleanAir

Junior Member
Joined
Sep 13, 2019
Messages
30
Reaction score
0
Thanks for the reply.

1. I checked port 51515 is permitted for 0.0.0.0/0, 80 & 443 is allowed thus i am able to access pi-hole website. It does seem like it only works if i connect via wireguard either on my computer or on my phone however entering the dns (google external ip) just on network adapter ipv4, it does not work. The internet gets cut off

I tried a nslookup as well and results seems all not successful.

From what i can see, it seems like if i manual add the dns ip on the laptop, it will not work.

Additionally i have checked on the pi-hole, it is permitting all origins. Now im at a point not sure where else to check, maybe if its possible to see ur firewall rules? Only see permitting 80,443, 51515. Is port 53 needed as well?
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
37,692
Reaction score
12,874
Thanks for the reply.

1. I checked port 51515 is permitted for 0.0.0.0/0, 80 & 443 is allowed thus i am able to access pi-hole website. It does seem like it only works if i connect via wireguard either on my computer or on my phone however entering the dns (google external ip) just on network adapter ipv4, it does not work. The internet gets cut off

I tried a nslookup as well and results seems all not successful.

From what i can see, it seems like if i manual add the dns ip on the laptop, it will not work.

Additionally i have checked on the pi-hole, it is permitting all origins. Now im at a point not sure where else to check, maybe if its possible to see ur firewall rules? Only see permitting 80,443, 51515. Is port 53 needed as well?

Port 53 is needed. Open it up for your IP address range as mentioned in the first post.

One additional step (at step 1) you need to do is to add port 80 and 53 to your home ip address
eg your home ip 154.205.95.36 (dynamic, isp change every 2 weeks)
put in firewall 154.205.0.0/16 so that it covers wider range
 
Last edited:

Hafi

Arch-Supremacy Member
Joined
Mar 30, 2003
Messages
15,340
Reaction score
5,351
Ahh i see, missed the port 53, was opening 443 instead hahas. Thanks its working now.

port 53 is not needed if you run everything through encryption DoH. You can test it by closing back port 53, open up port 443 and change your upstream to "https://cloudflare-dns.com/dns-query".

Do a test on https://cloudflare-dns.com/dns-query and see if it works. Better to run encrypted DNS on 443 than naked DNS on port 53.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
37,692
Reaction score
12,874
port 53 is not needed if you run everything through encryption DoH. You can test it by closing back port 53, open up port 443 and change your upstream to "https://cloudflare-dns.com/dns-query".

Do a test on https://cloudflare-dns.com/dns-query and see if it works. Better to run encrypted DNS on 443 than naked DNS on port 53.

There seem to be two things here.
1. Configure Pi-hole to use DoH, pretty easy. I have to restart the Cloudflared occasionally though.
https://docs.pi-hole.net/guides/dns-over-https/

2. Use HTTPS for the Pi-Hole web interface
There are arguments whether this is necessary or not if you open port 53 and port 80 only to your home IP address. For outside of home, you have to use Wireguard.

If one really wants to do this, there is a guide as well.
https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771

*** From the above link ***
Blindly enabling HTTPS for your Pi-hole Web Interface via Let’s Encrypt or a Self-Signed certificate causes issues such as:

Browsing slowdowns on any site visited, as blocked content needed to time out (or load infinitely)

Web Browser errors, such as mismatched certificates

Operating system popups on macOS/iOS devices on every site containing blocked content
 
Last edited:

Hafi

Arch-Supremacy Member
Joined
Mar 30, 2003
Messages
15,340
Reaction score
5,351
There seem to be two things here.
1. Configure Pi-hole to use DoH, pretty easy. I have to restart the Cloudflared occasionally though.
https://docs.pi-hole.net/guides/dns-over-https/

the weird thing is I didn't do anything else except replacing the upstream DNS provider from 1.1.1.1 to https://cloudflare-dns.com/dns-query. However I am hosting the instance (for me is AdGuard Home instead of pi-hole) on local network so not sure if that makes any difference. The beauty is I dun even need to configure each of my device to access DoH and even old outdated Mozilla browser is also covered according to my tests.

2. Use HTTPS for the Pi-Hole web interface
There are arguments whether this is necessary or not if you open port 53 and port 80 only to your home IP address. For outside of home, you have to use Wireguard.

If one really wants to do this, there is a guide as well.
https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771


*** From the above link ***
Blindly enabling HTTPS for your Pi-hole Web Interface via Let’s Encrypt or a Self-Signed certificate causes issues such as:

Browsing slowdowns on any site visited, as blocked content needed to time out (or load infinitely)

Web Browser errors, such as mismatched certificates

Operating system popups on macOS/iOS devices on every site containing blocked content

You can solve this by getting the full SSL/TLS certificate from Cloudfare (for free but you need to sign up an account) and you need your own domain name. I had this setup (on my retired VPS server) on Cloudfare with my own domain name so my DNS web panel to the instance becomes https://dns.myowndomain.com instead of my server IP address. To do this, you need to change your domain nameservers to Cloudflare ones and then get the full cert from SSL/TLS section and paste it to your DNS web panel HTTPS section. A bit confusing for first timers but its easy to setup once you get the hang of it. Its like hosting a Wordpress blog or any other website requiring SSL. If you don't use the full certificate then you'll face browser errors for self-signed certificates.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
37,692
Reaction score
12,874
the weird thing is I didn't do anything else except replacing the upstream DNS provider from 1.1.1.1 to https://cloudflare-dns.com/dns-query. However I am hosting the instance (for me is AdGuard Home instead of pi-hole) on local network so not sure if that makes any difference. The beauty is I dun even need to configure each of my device to access DoH and even old outdated Mozilla browser is also covered according to my tests.

Probably this is the difference between Pi-Hole and adguard.

Ref: adguard supports DoH amd DoT. Pi-hole only supports DoH with the help of cloudflared.
https://kb.adguard.com/en/home/overview

Ref: guide used by post #1 of this thread
https://github.com/rajannpatel/Pi-H...locking-vpn-server-behind-your-router-at-home

If you read the above guide, the original intention of the use is actually like this:

1) If you set up the server over the cloud, he expects the use to use wireguard on each client, and not really on the home router, so you do not even need to set up DoH using Cloudflared, because wireguard will encrypt the traffic.

Now that we want to use it on the home router, I think it is better to set up DoH. Still port 53 has to be open.

2) If you set up at home network behind the router, he actually says that you need to set up DoH using Cloudflared.
 
Last edited:

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
37,692
Reaction score
12,874
You can solve this by getting the full SSL/TLS certificate from Cloudfare (for free but you need to sign up an account) and you need your own domain name. I had this setup (on my retired VPS server) on Cloudfare with my own domain name so my DNS web panel to the instance becomes https://dns.myowndomain.com instead of my server IP address. To do this, you need to change your domain nameservers to Cloudflare ones and then get the full cert from SSL/TLS section and paste it to your DNS web panel HTTPS section. A bit confusing for first timers but its easy to setup once you get the hang of it. Its like hosting a Wordpress blog or any other website requiring SSL. If you don't use the full certificate then you'll face browser errors for self-signed certificates.

Nice tip. I will try this out.

Actually I may need to do this anyway for other experiments as well -- for some Socks 5 proxy thingy.
 

Hafi

Arch-Supremacy Member
Joined
Mar 30, 2003
Messages
15,340
Reaction score
5,351
Now that we want to use it on the home router, I think it is better to set up DoH. Still port 53 has to be open.

2) If you set up at home network behind the router, he actually says that you need to set up DoH using Cloudflared.

I setup AdGuard Home on a Windows 10 machine behind my main router and it just works out of the box, no need fiddling with port 53 or 443 in Windows firewall or on router.

My experience with setting up DoH on local network is this... change the upstream DNS provider from 1.1.1.1 to https://cloudflare-dns.com/dns-query then test your connection on https://www.cloudflare.com/ssl/encrypted-sni/, the Secure DNS should have a green tick. This is for DNS https privacy only and if you want security as well which is DoT (TLS) then you'll have to setup SSL certificate as well, I have it working for my (retired) VPS server with Cloudflare and personal domain but I have no idea how to set it up on local network.
 

Hafi

Arch-Supremacy Member
Joined
Mar 30, 2003
Messages
15,340
Reaction score
5,351
Nice tip. I will try this out.

Actually I may need to do this anyway for other experiments as well -- for some Socks 5 proxy thingy.

np... my previous post not so detailed cos I didn't see anybody asking about setting up domain name with Cloudflare SSL but if you need any steps or clarification feel free to ask I will try to answer in detail. ;)
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
37,692
Reaction score
12,874
np... my previous post not so detailed cos I didn't see anybody asking about setting up domain name with Cloudflare SSL but if you need any steps or clarification feel free to ask I will try to answer in detail. ;)

Thanks. If I encounter issues along the way I will sure ask here.

I have read about the free SSL certificate from Cloudflare, it looks good to me.

I have got a free domain from Freenom, registered a free account with Cloudflare. Then I created a sub domain record to point to a free tier VPS public IPv4 IP. Strange thing is that ping to the domain is much faster now that it is using the specific Cloudflare DNS name servers.

Next step is to utilize the free SSL certificate.

Some people recommend Namecheap for the domain but it is not free. So I will try out free ones first.
 

miloaisdino

Senior Member
Joined
Mar 25, 2016
Messages
843
Reaction score
26
Thanks. If I encounter issues along the way I will sure ask here.

I have read about the free SSL certificate from Cloudflare, it looks good to me.

I have got a free domain from Freenom, registered a free account with Cloudflare. Then I created a sub domain record to point to a free tier VPS public IPv4 IP. Strange thing is that ping to the domain is much faster now that it is using the specific Cloudflare DNS name servers.

Next step is to utilize the free SSL certificate.

Some people recommend Namecheap for the domain but it is not free. So I will try out free ones first.

theres lets encrypt!
 

Hafi

Arch-Supremacy Member
Joined
Mar 30, 2003
Messages
15,340
Reaction score
5,351
Thanks. If I encounter issues along the way I will sure ask here.

I have read about the free SSL certificate from Cloudflare, it looks good to me.

I have got a free domain from Freenom, registered a free account with Cloudflare. Then I created a sub domain record to point to a free tier VPS public IPv4 IP. Strange thing is that ping to the domain is much faster now that it is using the specific Cloudflare DNS name servers.

Next step is to utilize the free SSL certificate.

Some people recommend Namecheap for the domain but it is not free. So I will try out free ones first.

if you referring using Freenom DNS server is slow then its possible since it is free... cos of limited funding, they won't be able to optimize and geo-load balance their DNS servers like Cloudflare DNS servers which are better optimized for speed and latency since they are also a well rounded CDN provider. If you dun believe, you can ping and trace Freenom DNS server and see where it is and then ping and trace where Cloudflare DNS you hit but I guarantee for Cloudflare will be a Singapore server you are pinging.

Depending on what you use your domain for... if it is use to build web asset like a wordpress blog or e-commerce website then it is better to go for a paid one, reason being you won't lose your domain for unknown reasons, imagine you painstakingly build your website and SEO for many months and it got takedown/ransom cos its getting popular. If you want to use it for SPAM, proxy or anything experimental then no issue with getting a free one. For paid domains, Namecheap, Namesilo, Porkbun and even Cloudflare (yes... Cloudflare also sell domains LoL) are reputed registrars with Namesilo and Porkbun being the cheapest. Avoid GoDaddy and those web hosting package that bundle with domain and you'll be fine.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
37,692
Reaction score
12,874
if you referring using Freenom DNS server is slow then its possible since it is free... cos of limited funding, they won't be able to optimize and geo-load balance their DNS servers like Cloudflare DNS servers which are better optimized for speed and latency since they are also a well rounded CDN provider. If you dun believe, you can ping and trace Freenom DNS server and see where it is and then ping and trace where Cloudflare DNS you hit but I guarantee for Cloudflare will be a Singapore server you are pinging.

Depending on what you use your domain for... if it is use to build web asset like a wordpress blog or e-commerce website then it is better to go for a paid one, reason being you won't lose your domain for unknown reasons, imagine you painstakingly build your website and SEO for many months and it got takedown/ransom cos its getting popular. If you want to use it for SPAM, proxy or anything experimental then no issue with getting a free one. For paid domains, Namecheap, Namesilo, Porkbun and even Cloudflare (yes... Cloudflare also sell domains LoL) are reputed registrars with Namesilo and Porkbun being the cheapest. Avoid GoDaddy and those web hosting package that bundle with domain and you'll be fine.

Thanks for the input. Yes now I am just experimenting so I use all free stuff, from the VPS to the domains to the SSL certs.

I am using the Cloudflare DNS and not FreeNOM DNS for the domains. Cloudflare seems to cache the domains so ping is much faster and actually point to Cloudflare IPs and not the original VPS IPs.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
37,692
Reaction score
12,874
lets encrypt need to renew cert frequently whereas Cloudflare Origin CA SSL cert last for 15 to 35 years!! :eek:

It seems to me both have its advantages.

Cloudflare "Origin Certificates" free TLS certs are up to 15 years. It is used for installation on the "origin" server.

But it states that "Origin Certificates are only valid for encryption between Cloudflare and your origin server". So it is kind of incomplete encryption.

Ref:
https://moz.com/blog/traditional-vs-lets-encrypt-vs-cloudflare

https://sitemonki.com/blog/letsencrypt-vs-clouflare-for-free-ssl-provider-for-your-website/

https://nickjanetakis.com/blog/lets-encrypt-vs-cloudflare-for-https

My previous limited exposures to the certificates were actually with more stringent and much more expensive Windows kernel driver signing certificates because of my involvement with some open source projects.
 
Last edited:
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top