Generate a configuration file for use with Unbound DNS server to redirect domains to a lancache.
Thanks to uklans.net for compiling and maintaining the list of domains.
git clone https://github.com/zeropingheroes/lancache-dns-pfsense.gitcp .env.example .envnano .env
You can also use a comma to seperate multiple ip addresses, for example:
export LANCACHE_IP="192.168.1.1,192.168.1.2"
Run ./generate.sh to generate an unbound configuration file.
- Copy the generated configuration file to
/usr/local/etc/unbound.opnsense.d/ - Restart unbound
- From the web interface: Services > Unbound DNS > General > 🔄
- From the terminal:
pluginctl -s unbound restart
- Navigate to Services > DNS Resolver
- Scroll down to Custom Options
- Paste in the contents of the generated file