Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
/ OPNsense-Plugins Public archive

OPNsense repo for custom plugins (Blocky DNS)

Notifications You must be signed in to change notification settings

gspannu/OPNsense-Plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

Please refer to the updated repository

https://github.com/gspannu/OPN-Plugins


This is an older repo and not supported.

Install Blocky DNS plugin on OPNsense

  1. Login to OPNsense shell.
  2. Execute the below two commands in OPNsense shell (either as root user or use sudo)
sudo fetch -o /usr/local/etc/pkg/repos/guru-repo.conf https://raw.githubusercontent.com/gspannu/OPNsense-Plugins/main/guru-repo.conf;
sudo pkg update -f
  1. On OPNsense, login to GUI. Go to System> Firmware> Plugins and search for os-blocky

  2. Install os-blocky

  3. Refresh the browser page to reload OPNsense GUI

  4. If Blocky is being used as the 'Primary DNS' then remember to disable Unbound/dnsmasq or setUnbound/dnsmasq listening port to something other than 53, else Blocky DNS will not execute and throw an error.

  5. Goto Services, and a new entry for Blocky DNS should be available. Enable/ use as appropriate.

  6. Once Blocky is confirmed working, you may configure the Blocky DNS configuration by directly editing blocky-config.yml file in /usr/local/etc/blocky/blocky-config.yml. Use something like nano /usr/local/etc/blocky/blocky-config.yml

  7. On OPNsense GUI > Disable and Renable Blocky DNS

  8. All errors are logged in '/var/log/blocky/blocky.log'

  9. Also check that Blocky DNS is working as the primary dns resolver. In OPNsense shell, execute cat /etc/resolv.conf and it should have a nameserver entry for localhost (e.g. nameserver 127.0.0.1).

[OPNsense] router:~ $ cat /etc/resolv.conf 
domain home
nameserver 127.0.0.1
search home

OPNsense may require a restart for this to work. It is advisable to restart OPNsense and check this.

  1. OPNsense made some changes recently where the primary DNS (:53) now needs to be advertised specifically by 3rd party DNS resolvers, like Blocky, AdGuardHome, etc. The plugin has been updated with this property and it shoudl work. However, it is a good idea to define the DNS server (for each affected interface) in the DHCP page of OPNsense. See below.

OPNsense GUI > Services > ISC DHCPv4 > [InterfaceName] > DNS servers. Specify the [interface IP address] address here e.g. 192.168.1.1 or 192.168.10.1. Do this for all DHCPv4 interfaces and it ensures that all clients will obtain the router IP address as DNS resolver (just in case Blocky fails to register on port 53). Read about this issue here for more details: opnsense/core#6513 (comment)


  1. Removing os-blocky plugin
sudo rm /usr/local/etc/pkg/repos/guru-repo.conf
sudo pkg update -f

Happy DNS resolving and Adblocking !

About

OPNsense repo for custom plugins (Blocky DNS)

Resources

Stars

Watchers

Forks