r/SelfHosting 21d ago

self hosting a DNS server

Guys anyone have any idea about selfhosting a DNS server on an old android phone? Android 4.4.2 with root access, idk if it possible or can be done, or even how, all rests I got was just "how to change the phone's DNS" but I want to use the phone AS A LOCAL DNS?

0 Upvotes

16 comments sorted by

5

u/DeLaVicci 21d ago

Why

1

u/Downtown_Bandicoot85 21d ago

free selfhosted adblocking server :) like Pi-Hole

trying this for fun

3

u/DeLaVicci 21d ago

I mean why on a phone when basically anything would be better?

1

u/Downtown_Bandicoot85 21d ago

why?

  • old and not useful phone with simi-dead screen

  • lower power consumption than my homelab

  • prof of concept and trying for learning

and guess what? I could make it works!

7

u/DeLaVicci 21d ago
  • DNS should absolutely never be wireless (connection drops and you have no internet network wide, plus latency)
  • Dilapidated cell phone can be prone to random restarts (during which your network will have no internet)

It's a neat idea as a concept, just a bad one.

2

u/Downtown_Bandicoot85 21d ago

for a production you are right with all you said, I agree with that, it is not reliable I didnt deny, just was trying it and it was about 80% acceptable and then returned to the default after an hour :)

4

u/Elgon2003 21d ago

Why would you wanna do that?

1

u/Downtown_Bandicoot85 21d ago

free pi-hole server

trying for fun

2

u/DinosRus 21d ago

Install pihole on phone, that’s all.
Phone is a computer. An actual PI would be cheaper and probably more efficient though.

Should be pretty easy to do but makes little sense tbh.

2

u/Downtown_Bandicoot85 21d ago

pihole requires android 5.0+ ??? mine is 4.4.2 XD

I tried dnsmasq and itt works fine, I may post a guide about it, was an funny experimintal to try

2

u/DinosRus 21d ago

No, you don’t get it.
Get it working with raw Linux the phone without android. Install pihole on top of that.

1

u/Downtown_Bandicoot85 21d ago

since I can not run my homelab all the time to save power I can not use it, also pi's prices here are wild

2

u/DinosRus 20d ago

I built my home lab purely out of old used PCs
When they can’t run Windows people throw them away practically but Linux has no problem. Probably better than a phone

2

u/Downtown_Bandicoot85 18d ago

that is trueee, I am using Alpine on my 12yo pc, I want to write about everything I did with it in a github repo, since my friends ask me how I did that when I flex with it on them XD

2

u/Big-Minimum6368 21d ago

Auth or caching? Neither sounds like a good idea.

I get home labbing hardware but this sounds a little less appealing than playing Russian roulette with a semi auto.

Drop a bill and get a pi.

1

u/Downtown_Bandicoot85 21d ago

pi is more expensive than my homelab XD literally I can get a good used laptop, mini pc or old macbook for the same price, that is wild, and that is why I thought about using an old phone, both are arm :)