Statement: This time, it's just my personal experience. Due to not tinkering with DNS for many years, based on my previous experience setting up SmartDNS and learning the basic settings of the MosDNS plugin, I decided to simplify and make it efficient and less prone to errors. I abandoned the complex combination of MosDNS+Adguard Home+PassWall and only used PassWall+MosDNS to achieve fast webpage loading and 4K streaming (the VPN is powerful). If there are any mistakes or better configurations, everyone is welcome to discuss on Twitter.
Update on October 6, 2023:
- MosDNS updated to V5.2.1 [link]
- Changed domestic DNS servers to HTTPS
- Set DNS server concurrency to 2
- Enabled DNS ad filtering
- Selected ChinaDNS-NG in PassWall
Cause:
A few days ago, I recommended an OpenWrt firmware on Twitter, which included a DNS plugin called MosDNS. According to its official Github page, it was first released in November 2020 and has now been iterated to v5.2.1. I found that the configuration of this DNS forwarder is much simpler than SmartDNS. Thinking back to the two episodes of "DNS Leaks" by Bu Liang Lin, it didn't catch my attention at the time. I thought, even if there are leaks, what can you do to me? We are pursuing the ultimate internet speed experience. Now I realize how naive I was. Since we can avoid unnecessary troubles through technology, why not better protect ourselves? So, I will record my setup process below.
MosDNS Settings:
MosDNS Basic Settings - Basic Options
MosDNS Basic Settings - Advanced Options
If you want to enable DNS ad filtering, remember to check the last option.
PassWall Settings:
PassWall DNS
Remote DNS: 127.0.0.1:5335
OpenWrt DHCP Settings:
DHCP/DNS Basic Settings
Check if DNS forwarding is set to 127.0.0.1#5335 (it will automatically change after the above settings, just verify it).
Verification:
After completing the above settings, check for DNS leaks at https://ipleak.net/ and WebRTC leaks at https://browserleaks.com/webrtc. If there are no Chinese DNS servers, then it's basically done. This is just the initial entry-level method. For advanced methods and understanding the principles, you can refer to Bu Liang Lin's DNS explanation videos.