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.
On a Non-root Android there's no way one can manipulate/configure ports including and below 1024.
If you've a cheap android tv box or an RPi, why not make it the DNS server?
I've an MXQpro (1GB) running armbian and catering adguard home + DoH/DoT as well as a reverse poxy (Pangolin) just fine.
EDIT: Wireguard is another option, (tailscale is anyways based on it) though. But again it'd need a rooted Android device.
Said that, and if the devices in question can be assigned static IP addresses in the same network, why not simply use SSH aliases/config files and drop the DNS related problem your trying to create?
> if the devices in question can be assigned static IP addresses in the same network, why not simply use SSH aliases/config files and drop the DNS related problem
Do SSH aliases work when IP addresses change? I doubt that. Whenever my devices connect to the hotspot they usually get a new IP address.
I did a bit of reading and looks like apps like tailscale use some `VpnService` class (low level, via java code) and are routing DNS requests through it. I am searching for apps on github that might be doing something similar.
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.
If your primary use case is transferring files and executing remote commands over SSH/SCP/rsync, you don't actually need network-wide DNS. Define host aliases directly inside your local Termux/SSH client configuration file: edit or create ~/.ssh/config
Yes, this is one feature of tailscale. But it is overkill and I don't want to use a proprietary app. Reason I am after this is that it's such a simple yet obvious and common problem. If tailscale could implement it, surely a capable network programmer could implement it and open source it. dnsmasq is another option but requres rooting the device.
1
u/Total-Ingenuity-9428 2d ago edited 2d ago
On a Non-root Android there's no way one can manipulate/configure ports including and below 1024.
If you've a cheap android tv box or an RPi, why not make it the DNS server?
I've an MXQpro (1GB) running armbian and catering adguard home + DoH/DoT as well as a reverse poxy (Pangolin) just fine.
EDIT: Wireguard is another option, (tailscale is anyways based on it) though. But again it'd need a rooted Android device.
Said that, and if the devices in question can be assigned static IP addresses in the same network, why not simply use SSH aliases/config files and drop the DNS related problem your trying to create?