I had to manually create the rpzsites file. Then this:
Something about the read loop?Code:Apr 15 09:15:00 RT-AC86U (unbound_rpz.sh): 27765 Attempting to Download 1 of 1 from https://urlhaus.abuse.ch/downloads/rpz/. Apr 15 09:15:01 RT-AC86U (unbound_rpz.sh): 27765 Reload unbound for zone named rpz.urlhaus.abuse.ch Apr 15 09:15:01 RT-AC86U (unbound_rpz.sh): 27765 Attempting to Download 2 of 1 from . Apr 15 09:15:01 RT-AC86U (unbound_rpz.sh): 27765 Reload unbound for zone named
Prior to the hotfix.
My one line (awk-based) Histogram statistics reporter method is even better!
Yes, that was it.You must have an empty line at the end of the file. Can you check?
Well it depends!I am thinking a table for the sites blocked (and count) over the last 30 days. I think for malware you may want more than just a chart, but to know the site as well.
OR
Would it be better to have a line graph with #1 of blocked events each day over the past 30 days? Just a graph?
No worries, glad I could help.Whoops Hotfix v3.03 Github md5=cef422d41ee5a36c4472694b34164dc4
'unbound_manager' didn't download 'rpzsites' file due to new functionality that I hadn't actually fully implemented in the script but had only gone-live in my head
Abject apologies @JGrana for the inconvenience caused.
Well it depends!
I defer to your better GUI HTML skills, but since we have barely touched the possibilities of the DNS Firewall, i.e. currently 'NXDOMAIN' i.e. block only, I'm thinking how much time/motivation would you have to devote in order to accommodate the other possibilities such as the 'walled-garden' GUI landing page etc.
P.S. Hopefully you will find my 'unbound.conf.firewall' tweak useful?.....which may mean you could expand your 'unbound_rpz.sh' script?....after all I have promoted your contribution in the menus '7?' or 'firewall ?'
Whoops , I haven't merged the GitHub dev branch 'unbound.conf' v1.09 with the master branch....while enabling firewall in advanced mode i get:
[1586963535] unbound-checkconf[30099:0] error: cannot open zonefile rpz.urlhaus.abuse.ch.zone for rpz.urlhaus.abuse.ch.: No such file or directory
[1586963535] unbound-checkconf[30099:0] fatal error: Could not setup authority zones
***ERROR requested re(Start) of unbound ABORTed! - use option 'vx' to correct 'unbound.conf' or 'rl' to load a valid configuration file
e = Exit Script [?]
E:Option ==> i
that did it! no errors reported during firewall enableWhoops , I haven't merged the GitHub dev branch 'unbound.conf' v1.09 with the master branch....
Please update 'unbound.conf'
Code:e = Exit Script [?] E:Option ==> i
No, if you ENABLE that option, unbound will still be the recursive DNSquestion: if i enable the firefox dot option, does unbound still work as recursive server, or does that change?
It's in my script!I am not sure what you mean by unbound.conf.firewall? I don't see any file checked in like that? I am opening to making tweaks for sure.
Juched
Code:[1586862044] unbound-checkconf[30159:0] error: cannot open zonefile rpz.urlhaus.abuse.ch.zone for rpz.urlhaus.abuse.ch.: No such file or directory [1586862044] unbound-checkconf[30159:0] fatal error: Could not setup authority zones ***ERROR INVALID unbound configuration - use option 'vx' to correct 'unbound.conf' or 'rl' to load a valid configuration file
zonefile: /opt/var/lib/unbound/rpz.urlhaus.abuse.ch.zone # v1.09 Match @juched's 'rpzsites'
I doubt there will ever be a v3.04......not with my appalling/shoddy/slapdash coding/Github skills etc. for v3.03I just updated 'unbound_manager' to v3.03. When 'unbound_manager' was run I saw that v3.04 was available. I corrected the unbound.conf as per your post
Now all runs but it states it is v3.03 and does not detect a newer version 3.04 as it originally did !!!
I am confused, did I imagine v3.04 ???
OK !!I doubt there will ever be a v3.04......not with my appalling/shoddy/slapdash coding/Github skills etc. for v3.03
But unless there is another repository hosting a bug-free v3.04 then I'm afraid we are both confused - most likely due to lockdown-fever madness?
Ahh, I swear I searched (both master and dev) for that string but got no hits. Now I see it.It's in my script!
# Modify /opt/share/unbound/configs/unbound.conf.add
local FN="/opt/share/unbound/configs/unbound.conf.add"
[ -f $FN ] && sed -i '/#NOdnsmasq/,/#NOdnsmasqEND/ s/^#//' $FN
Got it!Ahh, I swear I searched (both master and dev) for that string but got no hits. Now I see it.
So, the idea is that I host another file (unbound.conf.firewall) which I would maintain to match rpzsites file ...... You would need to add in download code then, but I do like that idea.
Wait... no! I could generate the unbound.conf.firewall file from the rpzsites file.
Not sure I can do this today, but will look into this.
# Example rpz ( see https://medium.com/nlnetlabs/response-policy-zones-in-unbound-5d453de75f26 )
# Uses @juched's script so until vendor nlnetlabs.nl fix the 'url:' download issue - assume the zonefile will be downloaded externally,
# and an external cron job will update the DNS Firewall every 00:15 minutes
#
rpz: # DNS Firewall
name: rpz.urlhaus.abuse.ch # Zone name used by
#url: "http://urlhaus.abuse.ch/downloads/rpz/" # Until fixed by nlnetlabs.nl; comment out and use full path below
zonefile: /opt/var/lib/unbound/rpz.urlhaus.abuse.ch.zone # Sample @juched's 'rpzsites'
rpz-log: yes # DNS Firewall logging
rpz-log-name: "rpz.urlhaus.abuse.ch.log" # DNS Firewall log destination
rpz-action-override: nxdomain # Default action for zone entries
#==========================================================================================================================
# Define additional DNS Firewall rules/zones (@juched's script should ideally do this for you! ;-) from 'rpzsites' contents
# RPZ Zone download URL Download RPZ destination RPZ zone name
# --------------------- ------------------------ -------------
# https://urlhaus.abuse.ch/downloads/rpz/ /opt/var/lib/unbound/rpz.urlhaus.abuse.ch.zone rpz.urlhaus.abuse.ch
# http://abcdef.ghijk.lmnopq.rstuvw.xyz/ /opt/var/lib/unbound/rpz.myfirewall.rules1.zone rpz.myfirewall.rules1
#name: rpz.myfirewall.rules1 # Zone name used by 'unbound-control auth_zone_reload xxxx'
# url: "http://abcdef.ghijk.lmnopq.rstuvw.xyz" # Until fixed by nlnetlabs.nl; comment out and use full path below
# zonefile: /opt/var/lib/unbound/rpz.myfirewall.rules1.zone # Custom URL for custom zone 'rpz.myfirewall.rules1'
# rpz-log: yes # DNS Firewall logging
# rpz-log-name: "rpz.myfirewall.rules1.log" # DNS Firewall log destination
# rpz-action-override: nxdomain # Default action for zone entries
# Additional DNS Firewall rules/zones customisation using tags
#
# e.g. Define two tag, and only apply the DNS Firewall rules to certain LAN devices....
#server:
# define-tag: "malware social"
# access-control-tag 127.0.0.10/32 "social"
# access-control-tag 127.0.0.20/32 "social malware"
# access-control-tag 127.0.0.30/32 "malware"
#rpz:
# name: malware.rpz.example.com
# zonefile: malware.rpz.example.com
# tags: "malware"
#rpz:
# name: social.rpz.example.com
# zonefile: social.rpz.example.com
# tags: "social"
It's part of the experimental 'extended' code,...only partially implemented in the public release - but wasn't to be formally disclosed.Curious, what are you using this for? What settings do you keep in that block?
Code:# Modify /opt/share/unbound/configs/unbound.conf.add local FN="/opt/share/unbound/configs/unbound.conf.add" [ -f $FN ] && sed -i '/#NOdnsmasq/,/#NOdnsmasqEND/ s/^#//' $FN
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!