Keenetic / NetCraze
keen-pbr can be installed on Keenetic / NetCraze routers via Entware’s opkg package manager.
Install Entware on the router
First, ensure that Entware is installed on your router. Please consult the official router manual for Keenetic or NetCraze:
- Find your router’s manual.
- In the search field, search for “Installing the Entware repository on a USB drive”.
- Read and follow the instructions carefully.
Install required components
Open your router’s configuration page, navigate to Management -> System settings, and install the following additional components:
- Network Functions / IPv6 Protocol (On NDMS 5.0+ is absent because it is a part of core now)
- OPKG Packages / Open Package System Support
- OPKG Packages / Netfilter Subsystem Kernel Modules
- OPKG Packages / Xtables-addons Extension Package for Netfilter
- Utilities and services / DNS-over-TLS proxy (optional, but highly recommended)
- Utilities and services / DNS-over-HTTPS proxy (optional, but highly recommended)
Configure DoH/DoT on the router
It is recommended to set up DoH/DoT DNS servers on your router to protect yourself from DNS spoofing attacks.
Consult the official Keenetic documentation on how to do it: DoH and DoT proxy servers for DNS requests encryption.
Install keen-pbr from the repository
- Open keen-pbr repository page.
- Select “Keenetic / NetCraze” in the OS selector on the left, choose the “current” version, and select the architecture that matches your router.
- TIP: You can run
opkg print-architecturein an SSH session to see your router’s architecture.
- TIP: You can run
- Follow the instructions on the repository page carefully.
- When you run the
opkg install keen-pbrcommand, the installation script will prompt you to confirm whether you want to replace yourdnsmasqfile. If you are not sure, press y and then Enter.- Example install command:
bash
opkg install keen-pbr # or if you want headless version (without API and without WebUI) # opkg install keen-pbr-headless
- Example install command:
Ensure that keen-pbr service is up and running
Before continuing to the next step, it is recommended to check whether keen-pbr started successfully and has not crashed. Run /opt/etc/init.d/S80keen-pbr status. If it is dead, see Troubleshooting.
Example:
~ # /opt/etc/init.d/S80keen-pbr status
Checking keen-pbr... alive.If the service is alive, continue to the next step.
Enable dns-override
After installing keen-pbr, you have to enable dns-override so that all DNS requests from LAN clients are forwarded to Entware:
- Open http://my.keenetic.net/a (if this link does not open, open
http://<router-ip>/ainstead) - Run the commands
opkg dns-overrideand thensystem configuration save - Reboot the router. This is very important: without a reboot, the option will not become active.
Configure the service
After you reboot the router, you can open http://my.keenetic.net:12121 to configure keen-pbr (if you installed the full version; the headless version does not provide a Web UI).
You can also configure keen-pbr manually by modifying the configuration file: /opt/etc/keen-pbr/config.json.
Basic commands:
| Action | Command |
|---|---|
| Start service | /opt/etc/init.d/S80keen-pbr start |
| Restart service | /opt/etc/init.d/S80keen-pbr restart |
| Check if keen-pbr alive | /opt/etc/init.d/S80keen-pbr status |
| Check if dnsmasq alive | /opt/etc/init.d/S56dnsmasq status |
keen-pbr-headless package.
It uses less storage space (~1.2 MB instead of ~2.8 MB) and does not include the API server at all. You can also disable the API server at any time via a config flag, even when using the full package version.Next steps
Go to the Quick Start page and use the Web UI tab for the easiest initial setup. If you installed the headless version, see the JSON / CLI tab instead.