Android mobile phone to the hosts need root permission, really do not want to root, you set up a DNS Server, the specified domain resolution to a specific IP.
Maradns Server Setup:
http://maradns.samiam.org/download.html download Maradns-2-0-11-win32.zip and unzip to prepare two computers (can a computer handle it?) How do I set IP? ), an authoritative DNS server (authoritative DNS server) resolves the specified domain, and a common domain is resolved as a recursive DNS server (recursive DNS server). One, the authoritative DNS server configuration: HTTP://MARADNS.SAMIAM.ORG/TUTORIAL/AUTHORITATIVE.HTML1. Run MkSecretTxt.exe, Generate Secret.txt (random string); 2. Modify the Mararc file as follows: #绑定本机IP地址, such as 10.0.7.52
ipv4_bind_addresses = "127.0.0.1,
10.0.7.52"
Timestamp_type = 2
Random_seed_file = "Secret.txt"
Hide_disclaimer = "YES"
#配置域名字典
Csv2 = {}
#设置 the IP of the test.cn domain is saved in the Db.test.cn.txt file, note that the dictionary key is "." End csv2["test.cn."] = "db.test.cn.txt" 3. Create and modify the Db.test.cn.txt file as follows: foo.% 10.100.15.31-the foo.test.cn domain resolves to 10.100.15.31 4. Run Run_maradns.bat You can now set your phone's DNS to 10.0.7.52, but only test.cn can parse correctly, and other domains cannot resolve. Second, the configuration of the recursive DNS Server: HTTP://MARADNS.SAMIAM.ORG/TUTORIAL/RECURSIVE.HTML1. Switch to the second machine, unzip the Maradns-2-0-11-win32.zip and enter the Deadwood-3-2-07-win32 directory, run MkSecretTxt.exe, Generate Secret.txt (random string); 2. Administrator privileges run Install.bat, install Deadwood.exe for system service; 3. Modify the Dwood3rc.txt configuration as follows: #root_servers字典root_servers = {} #其他域查询 10.0.0.1 intranet has been set up DNS, or use the ISP's dnsroot_servers["." = "10.0.0.1"
#test. cn Domain Query 10.0.7.52
root_servers["test.cn." ="
10.0.7.52# The IP this program has
#绑定本机 IP Address
Bind_address= "127.0.0.1,
10.0.0.111"
# The IPs allowed to connect and use the cache# can access this server's IP range, ip/netmask format, where 16 means the mask's binary first 16 bits are 1, or 11111111 11111111 00 000000 00000000
Recursive_acl = "127.0.0.1/16, 10.0.0.1/16" # on the internal network, uncomment the following line:filter_rfc1918 = 04. Restart the Deadwood service phone to connect to Wi-Fi, set DNS to
10.0.0.111(Recursive DNS Server's IP). If you still have a problem, check your Windows firewall settings. Maradns earlier versions (1.4 and earlier) supported the recursive DNS server,2.0 version after removing this feature and using Deadwood instead. Reason: http://maradns.samiam.org/tutorial/update.html Maradns 2.0 is Maradns 1.4 with all recursive support removed from the Maradns daemon and do with the separate daemon De Adwood. Because of This:maradns can no longer serve both authoritative and recursive records on the same IP. While Deadwood uses a compatible RC file format, there is enough differences between a Mararc file (Maradns ' Configuratio n file) and a DWOOD3RC file (Deadwood ' s configuration file) that a conversion have to is done by hand. So in version 2.0 of the Mararc file There will be no upstream_servers, recursive_acl settings, online Search to the configuration may be the old version. In addition, you can use Askmara.exe in the ZIP package to test DNS Server. Http://maradns.samiam.org/tutorial/man.askmara.html
Maradns Server Setup under Windows