[MOD] DNS Server for Android - Notable speed increase

Search This thread

idcrisis

Senior Member
Aug 30, 2010
1,428
5,742
Hi,

This is a potential game changer, DNS server for Android, the open source, DNSMasq and some specific config files for it.

It runs on your Android device and you point your DNS queries to it instead of your remote ISP DNS server.

Using this setup will speed up your Android online experience many fold because DNS (specially over 3G) is one of the slowest blocking components of the entire browsing activity.

Features/Points to note -

- Caching, multithreaded. The replies from the cache are instantenous, hence browsing speed is enhanced significantly

- Query multiple DNS servers simultaneously. Fastest reply is used. Hence redundancy is also achieved along with speed. Currently set to Google DNS servers, Open DNS servers and your home Wifi router. Best not to use more than 5.

- Works with all versions of Android from 1.5 -4.x and all Android phones and tablets

- You can add your ISP's (both 3g and home) DNS servers to /data/local/dnsmasq.conf.

- Don't use your ISP's servers (and remove your Wifi router) if anonymity is a concern.

- Can help circumvent DNS restrictions.

- If your home router has DNS and an IP other than 192.168.1.1, you can change the entry in /data/local/dnsmasq.conf

- It may not start automatically if your ROM doesn't have init.d support. In that case and in either case, you can download SManager and set /etc/init.d/97dns to 'su' (run as root), 'boot' (run on boot) and 'net' ( run on network change)

- To make it stick all the more, you can download SetDNS and enable it and set the DNS server to 'Custom' -> 127.0.0.1 primary and 8.8.4.4 secondary ( backup Google DNS in case DNSMasq is not running for some reason). Make sure that you have Wifi and 3G options checked.

- Will significantly speed up your tethering experience if you set your DNS server to the Android phone and to use this DNS server. Currently the dhcpd option is disabled. You can either enable it or tell your tethering DHCP software to send DNS server=192.168.x.x ( or your Android phone IP) to your PC.

- Block Ads with the MVPS HOSTS file located at /data/local/dnsmasq-host

- VPN connections with and without split tunneling are supported. Check out commented sections in config files. Can use different DNS servers for different domains.

- You need to use this version of DNSMasq. Others ( eg those distributed with most ROMs) have a runaway CPU problem or don't work without the -d (debug) option. Any help resolving those issues welcome.

- You'll need root and su. busybox optional. Simply run Install.bat to install it and configure it automatically. Then make it stick with SManager and SetDNS as mentioned above.

- It's not mine, I just found the correct version and configured it.

- Enjoy! Please click the Thanks button if this helps you.

25th May - Fixed bug where Wifi DHCP wasn't working
 

Attachments

  • dnsmasq_android.7z
    339.7 KB · Views: 6,488
Last edited:

rsalib

Senior Member
Oct 24, 2009
180
31
Is it necessary to use the install.bat from a pc to make this work or can I just add the dns script to the init.d folder?
 

moffa~

Senior Member
Jan 6, 2011
212
93
Firstly, thank you.

I am trying to manually setup this so I can use some dns redirection (using the --server option) but when I run the install.bat file, it breaks tethering (which uses dnsmasq as well). Would you please help me out understanding what steps the script did to get it running?
 

idcrisis

Senior Member
Aug 30, 2010
1,428
5,742
Hi,

I think that this version of DNSMASQ may need some different startup options to support dhcp. I have specifically disabled dhcp in the config file.

Or it (dhcp) simply may be compiled out of the binary and it currently may not be usable for both DNS and DHCP.

YMMV. BTW the install script backs up the dnsmasq binary so you can replace it with the backup in case of any issues.

Cheers.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Hi,

    This is a potential game changer, DNS server for Android, the open source, DNSMasq and some specific config files for it.

    It runs on your Android device and you point your DNS queries to it instead of your remote ISP DNS server.

    Using this setup will speed up your Android online experience many fold because DNS (specially over 3G) is one of the slowest blocking components of the entire browsing activity.

    Features/Points to note -

    - Caching, multithreaded. The replies from the cache are instantenous, hence browsing speed is enhanced significantly

    - Query multiple DNS servers simultaneously. Fastest reply is used. Hence redundancy is also achieved along with speed. Currently set to Google DNS servers, Open DNS servers and your home Wifi router. Best not to use more than 5.

    - Works with all versions of Android from 1.5 -4.x and all Android phones and tablets

    - You can add your ISP's (both 3g and home) DNS servers to /data/local/dnsmasq.conf.

    - Don't use your ISP's servers (and remove your Wifi router) if anonymity is a concern.

    - Can help circumvent DNS restrictions.

    - If your home router has DNS and an IP other than 192.168.1.1, you can change the entry in /data/local/dnsmasq.conf

    - It may not start automatically if your ROM doesn't have init.d support. In that case and in either case, you can download SManager and set /etc/init.d/97dns to 'su' (run as root), 'boot' (run on boot) and 'net' ( run on network change)

    - To make it stick all the more, you can download SetDNS and enable it and set the DNS server to 'Custom' -> 127.0.0.1 primary and 8.8.4.4 secondary ( backup Google DNS in case DNSMasq is not running for some reason). Make sure that you have Wifi and 3G options checked.

    - Will significantly speed up your tethering experience if you set your DNS server to the Android phone and to use this DNS server. Currently the dhcpd option is disabled. You can either enable it or tell your tethering DHCP software to send DNS server=192.168.x.x ( or your Android phone IP) to your PC.

    - Block Ads with the MVPS HOSTS file located at /data/local/dnsmasq-host

    - VPN connections with and without split tunneling are supported. Check out commented sections in config files. Can use different DNS servers for different domains.

    - You need to use this version of DNSMasq. Others ( eg those distributed with most ROMs) have a runaway CPU problem or don't work without the -d (debug) option. Any help resolving those issues welcome.

    - You'll need root and su. busybox optional. Simply run Install.bat to install it and configure it automatically. Then make it stick with SManager and SetDNS as mentioned above.

    - It's not mine, I just found the correct version and configured it.

    - Enjoy! Please click the Thanks button if this helps you.

    25th May - Fixed bug where Wifi DHCP wasn't working
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone