Introduction: Ads Blocker Using Pi-Hole on AML-S905X-CC (Le Potato)

About: I am a semiconductor engineer. I do a lot projects as a hobby, such as robotics, programming, microcontroller, 3D printing, CAD modeling, and CNC.
  1. What is this Instructible about ?
  2. How to build the most affordable for its class SBC (Single Board Computer) for Pi-hole with direct (hardwire) connection to a home router. Hard-wired is preferred instead of Wi-Fi, generally more reliable.
  3. Prior to the Covic-19 pandemic, Raspberry Pi was essentially the only choice for the Pi-Hole (ads blocker app). Since the pandemic, the price has skyrocketed by 4 times. Many people, including myself, have been looking for a Raspberry Pi alternative.
  4. What is Pi-hole ?
  5. Pi-hole is a DNS sinkhole that protects your home devices from unwanted content, without installing any client-side software. It runs DNS lookup table therefore does not require powerful computer. In this Instructible I am using an SBC more than adequate for Pi-hole.
  6. Pi-hole is advertised as ads blocker, actually it also blocking other unwanted content and data collections, allow local DNS server, DHCP server, and other features.
  7. Is this blocking overkill ?
  8. The picture shows a typical 24 hours DNS queries at my home, 120 thousands queries, despite nothing seems extraordinary, like any family in a normal daily internet usage. From the picture, 60% of those DNS queries were blocked. Even when everyone is sleeping in my house, the quarry traffics continue.
  9. After digging deeper, I've learned, not only my family's cellphones but all of the smart devices in the house, including smart TVs, are constantly connected and exchanging information with external internet servers and most of them are ads.
  10. Why did I pick this particular SBC ?
  11. Cost
  12. More than enough performance for Pi-hole.
  13. It has just the right amount of hardware Pi-hole. The board does not have built-in Wi-Fi, but hard-wired to a router is more reliable.


After googling, I couldn't find a single source of instruction how to install it using this cheap SBC. I had to put the puzzle together to get it to work and decided to write this Instructible. Enjoy, leave me any question if you have any.

Supplies

  1. Libre SBC (Single Board Computer), $30 from Amazon
  2. A micro SD card, 8 GB or higher, $2 each.
  3. Cat-5/RJ-45 (ethernet cable), most people can find one around the house (see the picture).
  4. A USB-charger, $3 from Amazon or if you find one around the house, with micro-USB

In my case, since I have parts around the house, I only need to buy the Libre SBC and SD card, $32 + tax, free shipping from Amazon.

Step 1: SBC (Single Board Computer) Operating System Installation

This instructible assumes some moderate knowledge of Linux and Raspberry Pi. Please refer to the Raspberry Pi website for more information. For this particular SBC (Single Board Computer), the information is available from the website: https://libre.computer/products/aml-s905x-cc/, including the installation. The steps below are essentially the rephrasing the same instructions:

  1. Download the operating system image: https://distro.libre.computer/ci/raspbian/11/ or a newer version https://distro.libre.computer/ci/raspbian/12/
  2. Select 2023-05-03-raspbian-bullseye-arm64-lite+aml-s905x-cc.img.xz for a lean operating system or 2023-10-10-raspbian-bookworm-arm64-lite (newer)
  3. Download Raspberry Pi Imager: https://www.raspberrypi.com/software/
  4. Insert SD card into your computer.
  5. Open the Raspberry Pi Imager:
  6. Select "Use Custom" for the OS
  7. Select the 2023-05-03-raspbian-bullseye-arm64-lite+aml-s905x-cc.img.xz file you downloaded on step 1.
  8. Select the SD card for the "Storage" which is the SD card you inserted it.
  9. Click "Write" to install the OS into the SD card.
  10. Insert the SD card into the SBC.

Step 2: Setting Up the Pi Hole

  1. Connect the SBC to the home router using ethernet (CAT5/6).
  2. Connect the SBC to a monitor and keyboard.
  3. Power the SBC using a USB cable, and a USB charger.
  4. It will run through many software installation set ups, set all to the recommended options.
  5. It is highly recommended to change the password:
  6. Type: "passwd" to change the password.
  7. Install all of Linux Raspian updates:
  8. On the terminal, type: sudo apt update
  9. On the terminal, type: sudo apt full-upgrade
  10. Type "ifconfig" to obtain the IP address of the SBC:
  11. It will display something like below, where 192.168.0.211 is the IP address

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

     inet 192.168.0.211 netmask 255.255.255.0 broadcast 192.168.0.255


Step 3: Installing Pi Hole

Run the following commands on a terminal window:

  1. wget -O basic-install.sh https://install.pi-hole.net
  2. sudo bash basic-install.sh
  3. Go through the installation steps and use the recommended settings.
  4. When asked for "static IP address", select "yes".
  5. ifconfig to view the IP address, it will be something like the follow:
  6. It will display something like below, where 192.168.0.211 is the IP address:
  7. eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  8. inet 192.168.0.211 netmask 255.255.255.0 broadcast 192.168.0.255
  9. Edit /etc/dhcpcd.conf to set the static IP address using the address above.
  10. static domain_name_servers=<IP addresss>
  11. The set up on step 2 should provide the static IP address. This step just in case it does not.

Step 4: Setting Up the Router

  1. Go to your router admin page, e.g. 192.168.0.1
  2. Go to the DHCP setting to set Static or Reserved IP address:
  3. This to ensure the IP address of this SBC does not change when the router is rebooted.
  4. The picture above shows an example of my router IP address reservation.
  5. Set the primary DNS server:
  6. Set the Primary DNS to the IP address of this SBC.
  7. This allows the router to use the SBC Pi Hole as the DNS lookup, whether to block ads listed.

Step 5: View Pi Hole Dashboard

  1. Using computer or phone to open a browser with the address of the IP address of the SBC.
  2. As shown on the picture, it displays the internet queries in the last 24 hours. Typically 60% to 70% are blocked, actually they go a "sinkhole" (no response to ads, not even a return ping).
  3. Now you can remove the monitor and keyboard connections to the SBC.
  4. The SBC stays connected to the router.