TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.84k stars 400 forks source link

[App Feature Request] Multiple Blocklists for single CIDR in networkGroupMap (Advanced Blocking App) #796

Closed AlexIT-FT closed 4 months ago

AlexIT-FT commented 7 months ago

Hello, scenario:

This moment working with "unbound" , and this kind of configuration

        access-control-tag: 192.168.100.5/32 "abuse"
        access-control-tag: 192.168.100.6/32 "fraud"
        access-control-tag: 192.168.200.0/24 "ads abuse"
        access-control-tag: 192.168.300.0/24 "crypto ads abuse"
        access-control-tag: 192.168.400.0/24 "drugs crypto ads"

I would lile migrate to technitiumDNS but you should allow something like this

{
  "enableBlocking": true,
  "blockListUrlUpdateIntervalHours": 24,
  "localEndPointGroupMap": {},
  "networkGroupMap": {
    "192.168.100.5/32": "abuse",
    "192.168.100.6/32": "fraud",
    "192.168.200.0/24": "ads abuse",
    "192.168.300.0/24": "crypto ads abuse",
    "192.168.400.0/24": "drugs crypto ads",
    . . .
  },
  "groups": [
    {
      . . .
      "name": "abuse",
      "blockListUrls": [
        "https://raw.githubusercontent.com/blocklistproject/Lists/master/abuse.txt"
      ]
    },
    {
      . . .
      "name": "ads",
      "blockListUrls": [
        "https://raw.githubusercontent.com/blocklistproject/Lists/master/ads.txt"
      ]
    },
    {
      . . .
      "name": "crypto",
      "blockListUrls": [
        "https://raw.githubusercontent.com/blocklistproject/Lists/master/crypto.txt"
      ]
    },
    {
      . . .
      "name": "drugs",
      "blockListUrls": [
        "https://raw.githubusercontent.com/blocklistproject/Lists/master/drugs.txt"
      ]
    },
      . . .
 ]
}

but need to override some function to loop the array of string.split(' ') ...

Or is it already possible to do someway?

Thanks for all.

ShreyasZare commented 7 months ago

Thanks for the post. Its not possible to select multiple groups for a single network. The reason is that a group contains not just the blocklists but a lot of other settings too.

For your case, you can just create a "ads abuse" group and add both the block list URLs in it. It does not matter if a block list URL is included in more than one groups and it would work well without issues.