When the local DNS cache is contaminated by GFW, it is necessary to manually force clear the local DNS cache. Usually, fixing the network connection is sufficient. It is also simple to handle it using command line. Below are the methods to force clear the local DNS cache in Windows/Mac OS/Linux/Unix environments.
- In Windows environment, you can use the following command:
ipconfig /flushdns
- In Mac OS X environment, usually you can use the following command:
sudo dscacheutil -flushcache
- In Linux/Unix environment, depending on the system's DNS cache mechanism, if the system uses NSCD for DNS cache, you can use the following command:
sudo /etc/init.d/nscd restart
If the server or router uses DNSMASQ, you can use the following command:
sudo dnsmasq restart
Finally, for Android and iOS, you can refer to the above commands to solve the issue, but the following method is sufficient for clearing the cache:
Enable airplane mode -> Modify DNS -> Disable DNS