-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or requesttriagePending investigation & classification (CCB)Pending investigation & classification (CCB)
Description
Description
Integrate a Pi-hole-style DNS "blackhole" feature into Infix OS by leveraging the existing dnsmasq package. This requires a mechanism to ingest, format, and update domain blocklists to sinkhole unwanted traffic to 0.0.0.0.
Requirements
1. Configuration Changes
- Update the
dnsmasqconfiguration (e.g.,/etc/dnsmasq.conf) to support external host files. - Directive: Add
addn-hosts=/var/lib/dnsmasq/adblock.hosts. - Optimization: Ensure
expand-hostsandlocalise-queriesare enabled to maintain local network efficiency.
2. Blocklist Management Script
Develop a POSIX-compliant shell script (for BusyBox/Infix compatibility) to:
- Fetch community-maintained lists (e.g., StevenBlack/hosts).
- Filter and sanitize input to ensure compatibility with
dnsmasqhost format. - Perform atomic writes to
/var/lib/dnsmasq/adblock.hosts(ensuring this path is on a persistent, writable partition). - Reload
dnsmasq(e.g.,killall -SIGHUP dnsmasq) after updates without restarting the full service.
3. Buildroot Integration
- Kconfig: Add
BR2_PACKAGE_INFIX_ADBLOCKtoConfig.in. - Provisioning: Include a default, lightweight blocklist in the rootfs overlay to ensure functionality if the device is offline during initial setup.
- Automation: Add a
crondentry to/etc/periodic/weekly/to automate list refreshes.
4. Constraints & Performance
- Memory Footprint: The script must handle large files (100k+ entries) using stream processing (
sed/awk) rather than loading into memory. - Storage: Ensure the blocklist does not exhaust available flash space on low-resource targets.
Acceptance Criteria
dnsmasqsuccessfully loads the supplemental host file on startup.- The update script correctly parses a remote source into a
0.0.0.0 <domain>format. - DNS queries for blocked domains return
0.0.0.0to the client. - The solution survives a system reboot and maintains persistent lists.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttriagePending investigation & classification (CCB)Pending investigation & classification (CCB)
Type
Projects
Status
No status