unbound: improve startup and dhcp script robustness

- prevent rapid overlap in DHCP script updates
- check and allow localhost forwards with specific applications
- add option for rate limiting inbound queries
- change UCI list to table format with Unbound conf references

Signed-off-by: Eric Luehrsen <ericluehrsen@gmail.com>
This commit is contained in:
Eric Luehrsen
2020-07-04 13:55:40 -04:00
parent f73ed87a12
commit d00237135d
9 changed files with 320 additions and 457 deletions
+13 -1
View File
@@ -82,7 +82,7 @@ domain_ptr_ip4() {
##############################################################################
host_ptr_ip4() {
# Get omplete host ...in-addr.arpa.
# Get complete host ...in-addr.arpa.
echo "$1" | awk -F. \
'{ x = ( $4"."$3"."$2"."$1".in-addr.arpa" ) ;
sub(/\/[0-9]+/,"",x) ;
@@ -136,6 +136,7 @@ valid_subnet_any() {
echo "not"
fi
}
##############################################################################
private_subnet() {
@@ -152,6 +153,17 @@ private_subnet() {
##############################################################################
local_subnet() {
# local subnet 2nd place is limited to one digit to improve the filter
case "$1" in
127"."[0-9]"."[0-9]*) echo "ok" ;;
::1) echo "ok" ;;
*) echo "not" ;;
esac
}
##############################################################################
domain_ptr_any() {
local subnet=$1
local arpa validip4 validip6