Hot answers tagged

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 ...
Irfan Latif's user avatar
  • 19.9k
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
mirh's user avatar
  • 357
10 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 ...
Irfan Latif's user avatar
  • 19.9k
8 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. ...
droidgren's user avatar
  • 286
6 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 ...
Dimarc67's user avatar
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 ...
xavier_fakerat's user avatar
5 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 ...
Irfan Latif's user avatar
  • 19.9k
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 ...
Irfan Latif's user avatar
  • 19.9k
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 ...
Irfan Latif's user avatar
  • 19.9k
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:...
Shayan's user avatar
  • 137
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, ...
DBX12's user avatar
  • 131
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 ...
Paweł Bulwan's user avatar
3 votes

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 ...
Irfan Latif's user avatar
  • 19.9k
3 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 ...
Irfan Latif's user avatar
  • 19.9k
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 ...
user218076's user avatar
2 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/...
ZeroDivisi0n's user avatar
2 votes

Is it possible to set DNS for mobile network

Just to add an up-to-date answer, I wrote an App which changes the DNS of both Wifi and mobile connections also without root. Have a look at PlayStore or Amazon.
Aykut Çevik's user avatar
2 votes

How can I flush the DNS Cache?

In modern versions of Android there is an option to clear Chrome's DNS cache under chrome://net-internals/#dns
Joao Costa's user avatar
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 ...
Irfan Latif's user avatar
  • 19.9k
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 ...
Aloha's user avatar
  • 335
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 --...
Harlaus's user avatar
  • 21
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 ...
Irfan Latif's user avatar
  • 19.9k
2 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-...
Erikw's user avatar
  • 121
2 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 ...
Absent Recall's user avatar
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 ...
Robert's user avatar
  • 18.9k
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 ...
Irfan Latif's user avatar
  • 19.9k
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 ...
Irfan Latif's user avatar
  • 19.9k
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 ...
Steven Segers's user avatar
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: ...
karthik nair's user avatar
  • 1,215
1 vote

Problems with the DNS Network part (or maybe virus/malware-related) on Android 6.0 Marshmallow (Alcatel Vendor)

Try the new Cloudflare app "1.1.1.1" It will give you privacy enhanced DNS which will circumvent your ISP. I am not associated with the app or its vendor. I recently learned that my mobile vendor ...
newyork10023's user avatar

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