Hot answers tagged

2

HOW DNS QUERY AND CACHING WORKS? Mostly I find that subsequent DNS lookups are always just for mymovies and never again for mymovies.home NOTE: Just to make sure, check that .home search domain is set: ~$ dumpsys netd | grep 'search domains:' search domains: home This behavior is due to Negative DNS Caching. The question is not explicitly about ...


2

Add allowed hosts to /etc/hosts and define these firewall rules to block any outgoing DNS queries on standard UDP port 53: ~# iptables -I OUTPUT -p udp --dport 53 -j REJECT * May also use less rude DROP target in place of REJECT To be on safe side also block TCP port: ~# iptables -I OUTPUT -p tcp --dport 53 -j REJECT iptables is part of stock Android ...


2

How DNS queries made by a program are being resolved isn't specific to an OS, but depends on the resolver library the program is using. DNS resolvers have traditionally been part of OS's standard C library e.g. Bionic on Android, libcmt on Windows, glibc, musl, dietlibc, uClibc and others on Linux. Not all C libraries use the same approach to resolve host/...


2

There are no settings to set DNS server with Mobile Data. An exception is Private DNS (DoT) on Android 9+. Also sometimes DNS leakage may occur with WiFi DNS settings e.g. if some app has hard-coded DNS server address. However with root access you can force redirect DNS queries to any specific server using iptables. See details in How does Android OS do DNS ...


2

Thank you all for the comments. They helped me work it out. I'm not 100% sure of the cause of the behavior. It stays even when I switch off 4G and restart the phone. In the post linked to by Irfan Latif it is suggested that Android favors IPv6 dns servers. That could be the cause since my network is IPv4 only. But the hairpin NAT provided the solution. (...


1

DNS resolution in Android is handled by Net Daemon (netd) which runs in background as an init service. netd uses the DNS server set in Wi-Fi settings or that received through DHCP. Or it can possibly be set through CLI. See details in How does Android OS do DNS name resolution?. But there is no way to specify DNS server on per app basis. Using Android's ...


1

SHORT ANSWER: You would be able to ping a local host by name only if your Wi-Fi router (or some other local host) is running a DHCP/DNS server which does know the name of the host you are trying to ping. This is a screenshot from my router: Also make sure your Android device is sending DNS queries to local server and not on internet. Android loves Google ...


1

So, how can I persuade Termius (free version) to understand local network host names? In fact you have to persuade Android OS, not a specific app. Resolving hostnames is handled by Android's C library to which apps are linked through APIs at the time of compiling. On the PC I can simply issue the command putty fred@servername and I can login without ...


1

No you can't. Each connecting client identifies using its own IP address BEFORE being granted internet access, This means that it does not need to clone address or servers after connection, it can continue sending and receiving packets along its establish (independent) route, identifying as it's own device.


Only top voted, non community-wiki answers of a minimum length are eligible