Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Configuration examples

...

Note

Before configuring, increase the DNS cache as it's used to store adlist entries. If limit is reached and error in DNS,error topic is printed "adlist read: max cache size reached"


PropertyDescription
urlUsed to specify the URL of an adlist.
ssl-verifySpecifies whether to validate the server's SSL certificate when connecting to an online resource. Will use the "/certificate" list in order to verify server validity.
fileUsed to specify a local file path from which to read adlist data
pause

Temporarily pause the use of all adlist.

Configuration examples:

URL based adlist:

Code Block
languageros
/ip/dns/adlist add url=https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts ssl-verify=no

To see how many domain names are present and matched, you can run:

Code Block
languageros
 ip dns adlist print
/ip/dns/adlist/print 
Flags: X - disabled 
0 url="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" ssl-verify=no match-count=122 name-count=164769 

Locally hosted adlist:

To create your adlist, you can create a Txt file with the domains. Example:

No Format
0.0.0.0 example1.com
0.0.0.0 eu1.example.com
0.0.0.0 ex.com
0.0.0.0 com.example.com

To add it :

Info

You can create the txt file on your PC, but it is also possible to create it in RouterOS, with following commands

"/file/add name=host.txt", and then you can run "file/edit host.txt contents" after adding entries, press

To add file to adlist :

Code Block
languageros
/ip/dns/adlist/add
Code Block
languageros
ip dns adlist add file=hostTo verify that it's compiled correctly run print command and the results will show how many hostnames you have added (if the file is created correctly as provided in the example)  file=host.txt match-count=0 name-count=4
Info

You can verify that file is formatted correctly with "/ip/dns/adlist/print" ,the results will show how many hostnames you have added, the hostname format must match the format given in previous example.