we know that some network operators have some operations on DNS for certain purposes, resulting in the use of ISP’s normal Internet settings and not getting the correct IP address through the domain name. Commonly used means are: DNS hijacking and DNS pollution. About the difference between DNS hijacking and DNS contamination, please find relevant articles. The way to deal with DNS hijacking is very simple, just need to change the system’s DNS settings to foreign DNS server IP address can be solved. But for DNS contamination, there is no other way than to use proxy servers and software such as VPN. But by our understanding of DNS pollution, or can be done without the proxy server and VPN software such as DNS can solve the pollution problem, to visit some websites originally can not access without using a proxy server or VPN case. Of course, that doesn’t solve all the problems, and when some inaccessible web site itself is not caused by the DNS pollution problem, you need to use proxy servers or VPN to access it.
we know that DNS contaminated packets are not generated on the routers passing through the network packets, but rather by their bypass. So DNS cannot stop pollution and DNS analysis results right back, but due to bypass the generated packet sent back faster than the foreign DNS server sends back fast, operating system that the first packet received is the return results and ignore subsequent received packets, the DNS pollution from. DNS pollution in certain countries is fixed over a period of time, but IP can be ignored, and the result is the data packets of these IP addresses, which directly solve the problem of DNS pollution.
here, I used Java to do a simple small program, and provide source code, after the operation of the machine, you can not have a proxy server and VPN case, you can directly solve the problem of DNS pollution. If you do not have Java installed, you can install one on the http://s.java.com/. After you unlock AntiDnsPollution.zip, run filter.bat (Linux user, run filter.sh) and wait for the startup to succeed. Then, set the IP address of the system’s DNS server to 127.0.0.1. Then open a command line window and execute NSLOOKUP. Some DNS contaminated domains are parsed correctly,
said the following about the specific work flow of this small program: first, after the program starts, read from a text file in the preparation of dnsfilter.properties, and then go to a non-existent DNS server, but this IP address is abroad — in the domain name query DNS hijacked, and then return to the IP address is hijacked IP that is recorded after the normal DNS query, automatically put these IP address filtering. >