Skip to content

Latest commit

 

History

History
274 lines (208 loc) · 11.4 KB

README.md

File metadata and controls

274 lines (208 loc) · 11.4 KB

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

networkchuck_pihole_for_arm

Recreation of “thenetworkchuck/networkchuck_pihole” container for arm architecture.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

Currently, there is no official way to deploy the "thenetworkchuck/networkchuck_pihole" container on a Raspberry Pi, as it was designed specifically for the amd64 architecture. However, this issue can be addressed by utilizing the latest container from "pihole/pihole," which supports the arm architecture. To recreate the "thenetworkchuck/networkchuck_pihole" container for arm architecture, the scripts made by NetworkChuck will be integrated into the pihole container.

In addition to this, several enhancements will be made to improve the user experience. For instance, the API for blocking and unlocking will be set to auto-start when the container is deployed. The addition of logs will also be implemented for better debugging and monitoring. Furthermore, users will have the option to create multiple lists of blocking websites, providing them with greater control over their network security.

(back to top)

Built With

  • Python
  • Flask
  • Docker

(back to top)

Getting Started

Prerequisites

Install Docker by following the official documentation Install Docker Engine on Ubuntu

Installation

If you are interested in the original version download the files from the networkchuck_pihole_original release.

  1. Clone the repo

    git clone https://github.com/AlexGarciaG/networkchuck_pihole_for_arm.git
  2. Compile the docker file

    cd networkchuck_pihole_for_arm/docker
    docker build -t networkchuck_pihole_for_arm -f Dockerfile .
  3. Deploy container using a yaml file witch based on the pihole/pihole container.

    Change “- /my_path” from the yaml in the “volumes:” to the path were you will edit and create your domain list files; and "WEBPASSWORD: 'my_password'" from the "environment:" section to your desired password.

     ```yaml
       # More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
       services:
         pihole:
           container_name: pihole
           image: networkchuck_pihole_for_arm
           # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
           ports:
             - "53:53/tcp"
             - "53:53/udp"
             - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
             - "8080:80/tcp"
             - "8081:8080"
           environment:
             TZ: 'America/Chicago'
             WEBPASSWORD: 'my_password'
           # Volumes store your data between container upgrades
           volumes:
             - '/my_path/etc-pihole:/etc/pihole'
             - '/my_path/etc-dnsmasq.d:/etc/dnsmasq.d'
             - /my_path/domains_list:/home/network/domains_list
           #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
           cap_add:
             - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
           restart: unless-stopped
     ```
    
  4. Change the owner of the folder used to hold domains_list so you can modified and create list without the necessity to logging in the docker container or user admin permissions.

      sudo chown $USER: /my_path/domains_list

(back to top)

Usage

The current version no longer works as the original version BLOCK EVERYTHING w/ PiHole on Docker, OpenDNS and IFTTT . To use the new version check the following tutorial. If we wish to have control over our favorite entertainment websites like Netflix, Disney +, Prime Video and YouTube, the steps are:

  1. Create a domain list.

Create a copy of template.sh and rename, example entertainment.sh and change domain1, domain2, domain3,.. to the desired domains. sh '(^|\.)Netflix\.com$' '(^|\.)disneyplus\.com$' '(^|\.)primevideo\.com$' '(^|\.)youtube\.com$'

Note: The format '(^|.)domain1.com$' is used to block anything related to that domain. If you want to be more specific check the Pi-hole documentation

  1. Block domain list.

Send a POST request to http://localhost:8080/block with the body { "list_name": "blockdomains.sh" }

  1. Unblock domain list

Send a POST request to http://localhost:8080/unblock with the body { "list_name": "blockdomains.sh" }

(back to top)

Roadmap

  • Recreate original container for arm.
  • Execute the API for blocking and unlocking when the container is deployed
  • Add option to create multiple lists of blocking websites
    • Using files.
    • Using data bases.
  • Add Logs for better debugging and monitoring

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - Alexis Garcia Gutierrez - contact@alexgarciag.com

Project Link: https://github.com/AlexGarciaG/networkchuck_pihole_for_arm

(back to top)

Acknowledgments

(back to top)