Add host overides in DNS resolver from CLI
-
Hi,
I need to add several host overides (~190 hosts) in DNS resolver on multiple pfsense, is this possible to add them from CLI ?
I've read a thread for 2.2 maybe it's now possible for 2.4.Thanks,
Regards -
You could do what pfBlocker does and use include in the custom options:-
server:include: /var/unbound/pfb_dnsbl.*conf
[2.4.4-RELEASE][admin@pfsense]/root: more /var/unbound/pfb_dnsbl.conf
local-data: "0.r.msn.com 60 IN A 172.16.255.2"
local-data: "0.start.bz 60 IN A 172.16.255.2"
local-data: "000dom.revenuedirect.com 60 IN A 172.16.255.2"
local-data: "005.free-counter.co.uk 60 IN A 172.16.255.2"
local-data: "006.free-counter.co.uk 60 IN A 172.16.255.2"
local-data: "007.free-counter.co.uk 60 IN A 172.16.255.2"
local-data: "008.free-counter.co.uk 60 IN A 172.16.255.2"
local-data: "008.free-counters.co.uk 60 IN A 172.16.255.2"
local-data: "008k.com 60 IN A 172.16.255.2"
local-data: "00hq.com 60 IN A 172.16.255.2"
local-data: "00inkjets.com 60 IN A 172.16.255.2"If you need a decent text editor to manipulate the text file check out notepad++
-
Thanks for your response @NogBadTheBad .
I was thinking more like a command to add an host overides from pfsense developper shell (option 12).
Like you suggested, I will use custom options, I tested with 250 lineslocal-data: "foo A x.x.x.x"
I can backup and restore without touching file systems
Regards