17
votes
How to run DNSCrypt as a background service on Android?
Pardon me if I fail to sum up the vast subject in a brief answer :)
SELINUX AND AVC DENIALS
Android is based on Linux kernel that makes use of Discretionary and Mandatory Access Controls (DAC, MAC) to ...
13
votes
Accepted
How does Android do DNS name resolution?
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 ...
10
votes
Change DNS for mobile data without using an app
Starting with Android 9 Pie it is possible to change DNS globally, provided they support TLS. Just go in
Settings → Network & internet → Advanced → Private DNS
10
votes
Accepted
Is there a way/app to automatically change DNS server based on connection?
The solution below will set Private DNS to "Automatic" on SSID: 'SSID-1' and 'SSID-2' Everything else will set Private DNS to your entered Private DNS hostname in settings.
Install Tasker.
...
7
votes
How to configure DNS properly while two LANs are running?
I'll try to explain my understanding of DNS on Android. It will help you troubleshoot related problems and serve me as future notes.
DNS
Domain Name Resolver has traditionally been a part of OS's C ...
7
votes
Accepted
Why is Android refusing to resolve DNS records pointing to internal IP addresses?
We recently encountered this issue, and we narrowed it to occurring ONLY on devices running Android v5 and newer. Android v4 and all other OS's have no issue.
With that tidbit, we determined that ...
5
votes
Android wifi says "Connected, no internet" but internet works just fine
Perhaps this seems likely to be a problem connecting to Google servers (captive portal server) not the browser configured captive portal login you seem to be refering to in your post.
(Sometime since ...
5
votes
Accepted
How to ping a local network host by hostname?
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 ...
5
votes
Accepted
DNS queries are cached permanently, how to reliably clear DNS cache on Android 7+?
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 ...
4
votes
How to always resolve a domain name to a fixed IP without rooting?
There are a few options you can go with:
Enter IP address directly (with port 80 or 443) to web browser's address bar instead of domain name. But this won't work if web server relies on host header ...
4
votes
Why is "mdnsd" draining my battery and how to stop it?
WHAT IS MDNSD:
mdnsd (Multicast Domain Name System Daemon) is Android's implementation of mDNSResponder, a part of upcoming Zero Configuration Networking. It allows you to automatically discover ...
3
votes
Why is "mdnsd" draining my battery and how to stop it?
It seems like it is the daemon for multicast DNS. I have the same issue as OP and Trevor. My solution is the following (assuming you have a rooted device). If you have adb, then do step 2 over that, ...
3
votes
Can I lock the DNS settings on Android devices?
I made a similar attempt on Android 11. The closest thing to password-protecting the DNS setting that I found was to password-protect the "Settings" app altogether. My steps:
Install the ...
3
votes
What values to set in Static IP Settings of Wi-Fi when changing DNS?
You should use OpenDNS Family shield which blocks porn and malicious websites.
Dns1: 208.67.222.123
Dns2: 208.67.220.123
If your ISP blocks other DNS's, try a secure connection (use Port 443):
Dns1:...
3
votes
How to set up a host to IP mapping on unrooted Android?
As mentioned by lzzy, you can use DNSMasq server to achieve this. But Chrome uses own DNS resolving process and this method may not work.
To start the server use the following command:
sudo /usr/...
3
votes
Why is Android refusing to resolve DNS records pointing to internal IP addresses?
I was finally able to solve this by setting up a DHCP server myself on the same network, which configures the correct Search Domain to send to the clients.
Once I had a dhcp server, in my case isc-...
3
votes
Why is Android refusing to resolve DNS records pointing to internal IP addresses?
I came across this post while trying to get my Android 6.0 device to use the locally configured DNS server to resolve local hostnames. One answer above indicated that Android 5.0 and newer insists on ...
3
votes
Is there a way/app to automatically change DNS server based on connection?
You can setup a Tasker profile that is based on either a location or a WiFi network to trigger the task. Set the task to change the custom setting for private DNS with the hostname dependent on which ...
2
votes
Accepted
How to Block/Filter Sites on Mobile Data Connection (Preferably using DNS Server)
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 ...
2
votes
Using OpenDNS for the 3g connection
You can't change a data connection's IP settings, unless you
are rooted, then you can use Linux-based approaches (e.g. iptables)
use an app that creates a VPN connection to a remote server that uses ...
2
votes
Changing DNS settings on Android doesn't work
First you must have dnscrypt installed.
These scripts require root access:
#!/bin/sh
#root is required
#daemonize dnscrypt
dnscrypt-proxy --daemonize --resolver-address=208.67.220.220:443 --...
2
votes
Edits hosts file ignored by chrome
If you want to redirect www.youtube.com to 127.0.0.1 you have to add it exactly that way to your hosts files.
However you only redirected the main domain youtube.com to 127.0.0.1. not the subdomain ...
2
votes
Accepted
How to use Private DNS on Android Pie for tethering?
DNS has traditionally been part of libc. Android's Bionic libc depends on netd for traditional DNS as well as Private DNS (DoT) implementation. See this answer for more details.
Since every app runs ...
2
votes
How to use "/etc/hosts" file as only DNS on Android?
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 ...
2
votes
Accepted
Specific DNS for a Android App
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 ...
2
votes
Where does Android get its DNS information when connected to Wi-Fi?
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 ...
2
votes
Android won't query DNS server for IPv6 addresses, why?
Android's hostname resolver (InetAddress.getAllByName(), etc.) will skip AAAA queries unless the device has an IPv6 routing table entry that covers the magic address 2000::.
As a workaround, we could ...
2
votes
Convince android to use AAAA records when VPN has IPv6 but main connectivity doesn't
Configure your VPN to route the entire IPv6 address space. The requirement is that you need a default route for IPv6 for chrome to consider AAAA.
I was having the exactly same problem on android 12 ...
2
votes
Accepted
Android 10 device won't reach one specific web-site?
Yeah two solutions I am aware of
Cause: improper configuration of IPV6 from ISP
Solution: Go to APN settings and disable IP V6 (set apn protocol to ipv4 from ipv4/v6 and save the current APN)
Cause: ...
1
vote
How does Android do DNS name resolution?
Can anyone explain what dnsmasq is doing here?
query[A] = resolution request for IPv4
From: obviously the source, as you already stated, your router's public address.
forwarded to: is the URL ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
dns × 173networking × 38
wi-fi × 37
wifi-hotspot × 13
internet × 10
tethering × 10
browser × 9
dhcp × 9
hosts × 9
vpn × 8
mobile-network × 7
private-dns × 7
4.4-kitkat × 6
5.0-lollipop × 6
mobile-data × 6
cache × 6
ssh × 6
ipv6 × 6
applications × 5
security × 5
settings × 5
connection-issues × 5
privacy × 4
wifi-tethering × 4
firewall × 4