In Brazil, betting has increasingly become a problem for the general population, with news of people losing everything, getting into debt, using government programs to feed their addiction to online betting houses.
The Solution
Unfortunately, there is no adequate solution for this problem. And it is likely that a solution will never be created, but what if we developers try a little? While browsing LinkedIn in recent days, I saw some posts from people who created APIs, apps, complex network-level solutions, and browser extensions, and while all these solutions are great at some level, they all fall into the same problem: "the method tends to be a bit complex or not universal."
💡 Then the idea came to me: What if there was a DNS server to filter betting sites? That would be simple to use!
How to Use on Your Android
🚨 It is extremely important to say here that the future of this project is uncertain due to unknown implementation costs (which come out of my pocket), so it will probably be discontinued in early January. Keep this in mind if you are going to use it, and always add a secondary DNS.
To use it on an Android device is very simple, just open the settings and search for "priv", you will probably find something like "private DNS" among the first results, select the "private DNS provider hostname" mode and type "betblock.andrealtoe.me". And it's ready, your device will already be blocking known betting domains that are in my repository. :)
How to Use on Your Windows
🚨 It is extremely important to say here that the future of this project is uncertain due to unknown implementation costs (which come out of my pocket), so it will probably be discontinued in early January. Keep this in mind if you are going to use it, and always add a secondary DNS.
To use it on your Windows, you can set the primary DNS with the following values:
Preferred DNS: 174.138.124.37
A tutorial on how to change these values can be found Here
How the Solution Was Made
All the code can be seen on my Github through the link: https://github.com/faakit/bet-blocker-dns
Among the technologies used are:
- Docker: To facilitate the creation and deployment of the service in an automated way
- Unbound: Recursive DNS server
- Python: To transform the blocks.txt file into an Unbound configuration file
- Certbot: For generating TLS certificates using Let's Encrypt
And Now?
Well, this was a fun challenge I took on for a few hours. The deployment of this service still has an uncertain future. But without a doubt, I leave you here with another possibility in the fight against betting sites.
And of course, if you are curious about what is not visible: The deployment was done on DigitalOcean using the cheapest droplet (after all, let's see how far it can go). For now, this costs me $6 per month besides my domain, but with the growth of usage, measures such as using a load balancer or increasing the power of the instance may be necessary. These are still questions I do not have answers for, and that is why this is a test!
And although I do not have problems with betting, I am using this DNS to see how viable its stability proves to be.