Openwrt uses its own dnsmasq to block websites (setting resolution)

Sometimes, we may want to block a website (e.g. screening Xiaomi ads), or set up a resolution for a specific website (for example, test your website locally before publishing it). Openwrt provides a parsing tool dnsmasq which is much more powerful than local host. Compared with local host, openwrt supports generic configuration and can resolve special types of records.

There are tutorials on the Internet, which need to install Adblock or something, but it is actually a matter of one line (three lines to be exact) (there is no location for modification on Luci, so it can't be solved on the web page).

 #Set the domain name a of example.com to 192.168.0.1 "UCI add"_ List DHCP. @ dnsmasq [0]. Address = / example. COM / 192.168.0.1 "
 block a type resolution of ad.mi.com domain name_ List DHCP. @ dnsmasq [0]. Address: / / ad.mi. COM / ", effective configuration (write to / etc / config / DHCP) 
 UCI commit DHCP # restart service 
 service dnsmasq restart

Ref

A reply to "openwrt uses its own dnsmasq to block websites (setting resolution)"

Comment

Email addresses will not be made public. Required item used * tagging

Use this site to reduce spam. Learn how we process your comment data