This repository contains a PHP script that will convert some of the filter lists used by AdBlock and uBlock into RouterOS commands to add static entries to the router's DNS server (/ip dns static). Combined with an additional firewall (/ip firewall filter) rule, shown below, this has the effect of blocking adverts (and/or malware, scams, etc., depending on the chosen lists) for any clients which are configured to use the router as their DNS server.
By blocking ads at the DNS server level, adverts are blocked even for locked-down devices such as smartphones and games consoles!
Note that it's generally easiest to configure your DHCP server to push DNS server entries to your clients, where those server entries point back to your router. That way, everything on your network will automatically use the ad-blocking DNS server.
Usage 請參考網頁吧
請特別注意以下,別讓自己的路由器鎖死了:
NOTE: my experience is the MikroTik RouterBoard devices (especially the consumer-level ones) aren't sufficiently powerful to use more than a few of these lists simultaneously. My own RouterBoard (RB450G), when presented with 60,000 static DNS entries, kept working quite happily for several hours until it tried reloading the static DNS entry list, which took it 16 minutes, during which time the DNS server wouldn't respond and even basic traffic forwarding performance was impacted. I strongly suggest that you only use one or two of these lists!