Where did I come up with this?
About a week ago I went to a car boot sale and found a TP-link router for 7 pounds and had an idea for a project! I wanted to see what I could do with this new router, as I have heard that privacy routers were a thing and that would be very useful, considering the amount of ads websites display in this day and age. Also, the router would be set-up in my room, meaning that the WIFI connection was also stronger and I have no ads to skip.
The research process
I went ahead and started researching the idea and found out about pi-hole (https://pi-hole.net/), a network-wide ad blocker that acts as a DNS sinkhole, meaning it blocks ads, trackers, and malicious domains. Instead of using browser-based ad protection,pi-hole works at the DNS level, preventing unwanted content across all connected devices.
The setup
What I used was my main computer (running Ubuntu) to actually run pi-hole and route the traffic from my router, through the pi-hole DNS server, and of course the router. I set up the router to create a whole new network, supplying bandwidth from my current router that provides WIFI to the whole house, but has a different subnet, so the devices on the first network don't interact with the ones on the new one. Here is a simple network diagram for this:
How I did this was connecting a LAN output cable from my main router into the WAN port of my new router, then connecting to my new router's network, configuring the DHCP settings and running a few commands in cmd in order to ensure the IP addresses assigned on both networks are different, preventing any interference with data transmission. I then set the the DNS of my router as the pi-hole DNS, allowing all the data on the network to flow through there, meaning no ads.
Testing if it works and it's effectiveness
This is the actual pi-hole dashboard where you can see the data and requests being filtered through it, acting like a sort of filter, taking out the particles you don't need and leaving the fluid to flow through, and this is it working and processing queries!
I went ahead and tried out an ad blocker test at https://adblock-tester.com/ and managed to score 100/100 points which is amazing.
I also tried out a network speed test to see if I was getting a good amount of Mbps, and it was great.
Final thoughts on the project
Here is what the actual router looks like with some stickers I put on it:
A problem with this setup is that pi-hole only allows data through the
network, as long as my main computer is on, which is not all the time,
so I needed to add a secondary DNS server, so I added Google. A way I
could solve this problem is by investing in a new Raspberry pi that can
run this set up 24/7, so I am on the lookout for one right now to fix
that (I could always use the one I have but it is a bit overkill). I
also want to set up a VPN to make it even more secure, but for what I
have right now I am satisfied, that will probably be my next addition
after getting a raspberry pi to host this.
Overall, I think this was a fun project that really allowed me to expand my knowledge about how routers behave, and how networks can be manipulated as a whole, a lot easier than I thought. I believe this was an invaluable learning experience considering the effort it took. I recommend you try this for yourself as it is really fun but also rewarding in the end.
If you have any questions, feel free to ask away.
Wow this is incredible Elias, I am astonished at the immense calibre of your work. You certainly have a bright future ahead of you!
ReplyDeleteThank you Viyath!
Delete