Created
April 27, 2022 11:22
-
-
Save jmhale/805a85e6b3b7762041c92dea8d3da95f to your computer and use it in GitHub Desktop.
Convert between Pihole and Unbound custom DNS lists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unbound to Pihole | |
cat unbound/etc-unbound/a-records.conf | awk '{print $4 " " $2}'| tr -d \" | sed 's/\.$//' > pihole/etc-pihole/custom.list | |
# Pihole to Unbound | |
cat pihole/etc-pihole/custom.list | awk '{print "local-data: \""$2". A "$1"\""}' > unbound/etc-unbound/a-records.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment