Hot answers tagged dns
6
According to Steve Kondik, this is essentially old code that is leftover from older versions of CyanogenMod:
This was only here for apps that were statically linked against uclibc in old CM versions. It can likely just be removed.
However, he also goes on to note:
Also, this file is NOT written when connecting to a network as /system is readonly. ...
5
In Android, the DNS Cache is not on the OS level (Linux), but on the Java level (managed by java.net.InetAddress). Therefore, it is not possible to list the cache contents from the shell, however you can access it from the Java code.
Please see Java DNS cache viewer question on StackOverflow, one of the answers has a sample Java code that prints the ...
5
While you're on Wifi, have a look in Wi-Fi settings > menu|Advanced.
It looks like it's easier when you're on Wifi than when you're on a celular signal (3 or 2.5g).I've found a blog post here that seems to do what your asking, but you may need to have rooted the phone, or at least be comfotable with editing a few system bits and bobs.
5
Addresses are cached for 600 seconds (10 minutes) by default. Failed lookups are cached for 10 seconds. From everything I've seen, there's nothing built in to flush the cache. This is apparently a reported bug in Android because of the way it stores DNS cache. Clearing the browser cache doesn't touch the DNS, the "hard reset" clears it because it simply ...
5
You can solve this issue either from the Android side or from the Windows side:
From the Android side
Tap your device "menu" button, and select "settings";
Tap "Wireless & networks";
Tap "Wi-Fi settings";
Tap your device "menu" to bring up extra options and select "advanced";
Tap "Use static IP";
Fill in your local network static IP details and dns ...
4
This is really a continuation of @Zuul's answer, to cover the DNS settings in Android 4.0+ (ICS), which is a little harder to find IMO. AFAIK Zuul's answer covers Android <2.3 settings.
From the Android side (Android 4.0+ ICS)
Settings
WiFi (click on word "WiFi", not ON/OFF switch)
Press and hold (long tap) your wireless network until dialog pops up
...
4
You could report the bug to the Android developers, or vote on an existing bug, if there already is one open. This one looks a bit like the issue you are talking about.
Make sure you explain exactly what is happening, and how they can reproduce the issue.
4
The only way to do this in Android is to do a hard reboot. The necessary command-line tools are not normally available, however in my tests a hard reboot has always done the trick for me (Galaxy Nexus, and HTC Desire, various ROMs).
This is a pain, but it is quicker than the 10min cache timeout.
4
On a typical Linux system the cache is cleared by running /etc/init.d/nscd restart, but at least my ROM doesn't use nscd to cache DNS. You can check if yours does, but I doubt it. I've seen suggestions that clearing the brower cache would clear DNS cache too, but one sure way is to do a hard reboot (shutdown, remove battery for 30s, reattach battery and ...
3
You can change the dns settings in Android, but you need to root your phone first:
http://blog.varunkumar.me/2010/09/how-to-change-dns-server-on-android.html
I don't believe there is a way to password protect the dns settings, but at least it wouldn't be obvious for them to figure out how to change the settings.
Edit:
Of course, one thing you can do to ...
2
OK just found it. In wifi settings press and hold the connected network you want to set IP to. Pick modify network and in there you scroll down, to DHCP settings and pick static and scroll down to et your IP. Kinda complicated comparing to non sense android. O well. Hope that helps OP or any other fellow searcher.
2
This is a known design problem when using statically linked libresolv and glibc.
You have 2 options:
Use Google Android's native libc Bionic library instead of glibc.
Build busybox to search libraries in /system/lib (or make the necessary links e.g. /usr/lib -> /system/lib ). Place ld-linux.so.3, libc.so.6, libresolv.so.2, libnss_dns.so.2 in your ...
2
It took a lot of effort but I actually found a working solution to my problem.
I first updated my phone to latest available Android version 2.3.6 and that did not solve my problem. So I installed an App that shows me more details about the network setup of my phone. And after some digging around I noticed what was wrong:
My phone didn't have a default IPv4 ...
2
The very-originally-named Dynamic DNS Client is a fairly popular app for this purpose.
As for service, noip is popular, free, and reliable in my experience.
1
I have yet to find a way to create a hostname for an Android device. What I have done is that I set an IP reservation for my phone, so that every time I go to use SSH (I use QuickSSHd, but it should work for SSHelper) you can at least point to the same IP address.
There is no way to set a host name for the phone, that I have found.
1
Do you have any control over the (presumably wireless) LAN that you're connecting your phone to? It seems to me that the main part of your problem is just that your phone picks up different IP addresses each time it connects to your LAN. If it always had the same IP, then you could either make a note of this, save it in your SSH client, or assign a name to ...
1
Currently there is no Avahi daemon on Android and open ticket #354 at Avahi tracker, where there are attached patches, needs to be addressed to make a build for Android possible.
You can try to build it manually, if really needed.
1
You might want to take a look at the DNS Settings app, which claims to be able to do what you want (you just have to switch once to a static IP to change the DNS settings, and then switch back to dynamic IP, according to the description). That's the only non-root app I could find for this issue -- there are two more apps at least, but they require root to ...
1
When on WiFi you can manually set IP information, Settings > Wireless & networks > Wi-Fi Settings > Menu button > Advanced. Mind you it would be very easy for anyone to modify those settings.
As far as when connected via cellular, I do not know of anyway to modify those DNS settings as they come from the carrier and the carrier's towers. I'm pretty sure ...
1
I've copied (and slightly changed) my answer from a comment I posted on an issue on the Google code page for Terminal IDE, however, it should be the same:
If you are rooted, you can install the latest version of busybox (you may be able to compile it). Then find out where you updated busybox is and run the following commands: (I'm assuming the new version ...
Only top voted, non community-wiki answers of a minimum length are eligible