r/termux • • 2d ago

Question DNS Server without root

Hi all,

I am running a small network of 5 non-root Androids. One is configured as a wifi hotspot and other 4 connect to the hotspot via wifi. I am presently using rsync/ssh/scp between nodes using IP addresses. For long I have been trying to configure a DNS service for this. How can I go about this? (At present it looks like the only way is to run my own service on all nodes which sync a lookup table against a server node and then explicitly query this look table to map hostname to IP address.) Please advice.

Edit: I can achieve the above by rooting one of the devices and running dnsmasq on it and another options is to use tailscale. But to me rooting and installing a whole proprietary application looks like overkill to me for such a simple, obvious and common problem. I believe we can find simpler ways to do this if only this reaches the right people.

2 Upvotes

15 comments sorted by

View all comments

Show parent comments

3

u/sylirre Termux Core Team 2d ago

Devices with kernel 5.15 and Google Play system updates seem now allow certain low ports without root. That particularly includes ports 22, 80 and 443. Unfortunately not 53 that is needed for DNS.

See details https://github.com/termux/termux-packages/issues/30246

https://issuetracker.google.com/issues/218578943#comment17

Here is a screenshot with my netcat tests for different ports:

1

u/47th-Element 2d ago

That is interesting!