SOLVED

DNS block list

%3CLINGO-SUB%20id%3D%22lingo-sub-2686695%22%20slang%3D%22en-US%22%3EDNS%20block%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2686695%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3Eis%20it%20possible%20to%20block%20a%20list%20of%20domain%20that%20i%20have%20on%20a%20txt%20file%20on%20a%20dns%20server%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2686695%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eblock%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDNS%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2687738%22%20slang%3D%22en-US%22%3ERe%3A%20DNS%20block%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2687738%22%20slang%3D%22en-US%22%3EYou%20could%20do%20it%20by%20creating%20a%20empty%20zone%2C%20example%20creating%20google.com%20but%20don't%20put%20anything%20in%20the%20zone.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2687813%22%20slang%3D%22en-US%22%3ERe%3A%20DNS%20block%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2687813%22%20slang%3D%22en-US%22%3EYes%20I%20already%20thought%20about%20that%2C%20but%20it's%2050%20entries%20and%20could%20get%20more%20and%20more%20and%20i%20want%20somethig%20more%20practical%20like%20a%20txt%20file%20with%20an%20entry%20every%20line.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

is it possible to block a list of domain that i have on a txt file on a dns server?

5 Replies
You could do it by creating a empty zone, example creating google.com but don't put anything in the zone.
Yes I already thought about that, but it's 50 entries and could get more and more and i want somethig more practical like a txt file with an entry every line.
best response confirmed by alescan (Occasional Contributor)
Solution

@alescan 

You may automate it using PowerShell, you may add the list into a Excel document and save it with CSV format and then use Import-Csv command to import it as a list in the PowerShell, take a look at Import-Csv (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Docs 

Then use function like Add-DnsServerPrimaryZone in a loop or and it will read each record and add it to the DNS. Take a look at Add-DnsServerPrimaryZone (DnsServer) | Microsoft Docs

Try to create a script for one record and then if it works as you expected then use the list.

 

This is not a bad idea, but instead of make and import csv, is better to read the txt file directly with:
Get-Content .\file.txt | ForEach-Object {
Add-DnsServerPrimaryZone ....
}

True, that's work too , however from experience I find out the CSV format is more reliable for large set of data but like you said reading from text file works too.
www.000webhost.com