Ok, first of all full disclosure: I'm the author of an app which is now on the Google Play Store and which makes you able to change DNS for any mobile connection on Android 4.4. The app requires root, costs a couple of bucks and is called Override DNS.
I was told, on a now deleted answer, that is fair to link to my app as long as I expose it clearly.
I did not find a way to reliably do it without an app.
I often use OpenDNS Family Shield, but sometimes it blocks me to visit some particular hacking site and then I need to quickly and easily change the DNS servers.
I used to use Set DNS but it stopped to work in Android 4.3 and further, so I created Override DNS, a new app which mimics Set DNS' behaviour,...
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 restrict access to system resources such as files on a certain filesystem. DAC includes classic UNIX RWX file modes, owner/group or UID/GID, Extended ...
I "solved" this problem by using an iptables rule to forward all port 53 connections to an intended DNS server; my experience on Android 4.4.2 with attempting to modify DNS settings while connected to 3G has been exactly as Leo described; ignorance of values in getprop |grep dns[0-9]\]: and dhcpd.conf.
iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --...
You cannot simply edit the hosts file on Android, as it resides on a read-only file system: /system/etc/hosts, see:
How to edit etc/hosts file
How to change the hosts file on android
use a DNS server like DNSMasq in your local network to take care for that "centrally"
use "root powers" to force-edit the system file as described above
I ended up manually changing my DNS server to tether Internet from my mobile phone. My phone uses a local DNS server from my mobile carrier which I was able to trace using CompruebaIP.
Any other DNS server is blocked by my mobile carrier (Globe Telecom). I reckon that my phone's DNS service is not properly working. When tethering, the DNS provider should be ...
Regardless whether you're connected to your local network via WiFi and DHCP is in use, Android always seems to override its DNS entries using Google's servers. It's somewhat hidden, but easy to change – provided you have your own DNS running (a lot of routers offer that already).
To do so, go to your list of WiFi networks in Settings, long-press your WiFi's ...
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/...
While the setprop method to change DNS does not work, the getprop method to read those values should be still valid today:
shell@A0001:/ $ getprop | grep dns
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 Android v5 and newer insists on using IPv6 for DNS name resolution. (Since we've completely disabled IPv6 on our network, this jibes with the issue.) If Android ...
I have been using the free SSHelper (without rooting) since it recently added zeroConf broadcasting. It provides an SSH and RSYNC (file transfer) server, while also broadcasting a ZeroConf name. Another avahi/bonjour client can connect without needing to know the android hostname. Explained in more detail in this other answer: Set hostname for SSHelper
First, without DNS the network connection won't be much helpful to you: you will need DNS to resolve host names to IPs – or entering something like www.google.com into the browser's address bar will just give you an error.
Which does not mean you cannot use a DNS server other than Google's.
From your homescreen:
Press the Menu key, select Settings
Go to ...
Run "nslookup google.com" from Terminal Emulator and the first result should be your DNS. Also you could run a standard test from dnsleaktest.com from your browser.
Edit: I just noticed this answer is kind of outdated for newer Androids because nslookup doesn't seem to run if you install Terminal Emulator. The modern method seems to be to install ...
I am leaving my old answer since the browse and parsing examples may still be useful for some people.
Thanks to the developer's version 5.5 update to SSHelper, you can create a user defined name to be the phones Zeroconf instance name. SSHelper will run the SSH server on a non-rooted Android.
Update SSHelper to version 5.5
Open Android Bluetooth settings ...
In the March 2014 update to SSHelper the documentation states new changes to it's Zeroconf broadcasting name. In the documentation Configuration section of the details it describes the checkbox to "Enable Zeroconf broadcasting". When this is enabled any other client on the local network, will be able to browse and then connect for SSHelper on the network.
This info is from 2014. But it might still work. I am not in the position to test it at the moment, but since you are rooted. You could try adding the dns settings to the build.prop file and see if it sticks. Adding the following to the build.prop file should add google as your DNS server.
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 Lollipop (5.1+)) When connected to networks (especially Wi-Fi networks), android system checks if there is an active internet connection by perfoming checks ...
I'll try to explain my understanding of DNS on Android. It will help you troubleshoot related problems and serve me as future notes.
Domain Name Resolver has traditionally been a part of OS's C library (commonly called libc). GNU libc (which is most common on Linux distros) implements a complicated name resolution mechanism named NSS which can prioritize ...
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 or SNI for virtually hosting multiple websites on same IP address.
It's possible to use VpnService API of Android to capture all DNS traffic without rooting ...
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, it is more comfortable to type on a keyboard ;)
Install a Terminal Emulator
Create a shellscript with the content su -c "kill $(pgrep mdnsd)"
Run it everytime ...
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 services and appliances attached to your network:
Name-to-address translation and other DNS-like operations (mDNS) in the absence of a conventional unicast DNS ...
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 network you are on.
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.
Set up tasker as follow: (Change SSID-1/SSID2 to your name)
State: Wifi Connected [ SSID:SSID-1/SSID-2 MAC:* IP:* Active:...
OK, I know I'm way late, but here's an alternative I'd like to share that may be of help.
Just open your browser at
https://email:firstname.lastname@example.org/nic/update?hostname=your_opendns_network_label to update your IP -- and that's it. On the email part, use "%40" as an @ and "%2E" as a dot, ie, write "someone%40somewhere%2Ecom" instead of "someone@...
The solution is further down the same page:
I had a problem flashing the zip (made by qwerty12) in the link so you may need to extract the contents to the relevant directories (in /system) and make sure they have the correct permissions. I used Fx explorer for this. You obviously ...
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/local/sbin/dnsmasq -d \
This is one silly issue in Lollipop update (CM12) for OnePlus. I'm assuming you're running Cyanogen OS 12, and I found (on Reddit) and tested this solution some time ago.
Unlike Kitkat, you can't change only the DNS in Wifi settings as "Save"/"OK" is always greyed out if you do, i.e. you need to provide every single detail which includes: