Hosting, NAS, and DNS block with RPi 3
A Raspberry Pi is a small, affordable single-board computer developed by the Raspberry Pi Foundation, initially designed to promote computer science education. First launched in February 2012, the Raspberry Pi has since gained significant popularity, not only for educational purposes but also in commercial applications. Companies today use the Raspberry Pi in various industries for tasks requiring portable yet powerful computing, such as digital signage in advertising and self-order kiosks in restaurants like McDonald's. The model I own is the Raspberry Pi 3 Model B v1.2, which features a 1.2 GHz quad-core ARM Cortex-A53 CPU, 1 GB of DDR3 RAM, and a variety of connectivity options, including Wi-Fi and Bluetooth. Manufactured in 2016, this model is now over 8 years old. Initially, when it was gifted to me by my dad during middle school, I was unsure of how to use it. However, now that I have graduated with a degree in Computer Science, I have developed a deep appreciation for the Raspberry Pi and miniboard computers, recognizing their potential for a wide range of projects and learning opportunities. Therefore, today I am using it for network-wide Pi-hole, server hosting with Nginx, and a NAS setup in my network using Samba.
Pi-hole Setup and DNS BlackholePi-hole is a network-wide ad blocker that functions as a DNS (Domain Name System) sinkhole, or blackhole, by preventing devices from resolving domains associated with ads, trackers, and malicious websites. It blocks unwanted content by intercepting DNS queries for these domains and rerouting them to an empty address. Pi-hole is set up to block approximately 2 million domains, ranging from phishing sites to intrusive ads and tracking domains. Since Pi-hole is configured as the DHCP provider for my home network, this setup applies to all devices, including my mobile phone, ensuring that the entire network benefits from enhanced security and a smoother browsing experience. Additionally, by blocking ads and unnecessary content, Pi-hole can even speed up the network, as it reduces the time spent loading unwanted data, resulting in faster page load times and improved overall network performance.
Server Hosting with NginxI have set up a server on my Raspberry Pi using Nginx, a popular open-source web server software, to host my personal website, cemyilmaz.tech, which serves as a portfolio to share blogs and information about myself. The Raspberry Pi is configured to forward ports 443 and 80, allowing secure HTTPS and HTTP connections to the website. This setup is incredibly cost-effective, as I am paying approximately 20 TRY per month for hosting, which is significantly cheaper than the typical cost of around 6 USD per month that popular hosting providers charge. While the Raspberry Pi is likely weaker than dedicated hosting services in terms of raw processing power, it perfectly meets the demands of my website, as it is primarily aimed at providing a simple and lightweight portfolio without requiring extensive resources. Additionally, the traffic to my website is light, making this setup even more suitable for the task.
Network-Attached Storage (NAS) SetupNetwork-Attached Storage (NAS) refers to a centralized storage device that connects to a network, allowing multiple users and devices to access and store files remotely. Modern NAS solutions can be quite expensive, with services like Dropbox charging around 10 USD per month for 2TB of storage. In contrast, the yearly cost of running my NAS setup on a Raspberry Pi is approximately 12 USD, making it a significantly more affordable option. To make this NAS setup work efficiently, I purchased the Frisby FHC-3575a 2.5''-3.5'' SATA USB 3.0 Docking Station. This docking station enables me to connect multiple hard drives to the Raspberry Pi, overcoming the Pi’s power limitations and ensuring proper support for larger storage drives. The NAS is shared across my entire family, freeing up space on devices such as my parents' mobile phones and serving as a place to store important files like photos. I use SAMBA for this setup, which is a software suite that provides file and print services to SMB/CIFS clients. While alternatives like OpenMediaVault and TrueNAS offer more comprehensive NAS systems, these are entire operating systems, meaning I would have to stop hosting my website and Pi-hole, making them less practical for my use case. SAMBA, being just a software suite, integrates seamlessly with my existing Raspberry Pi setup, making it an ideal choice. However, due to the limitations of the Raspberry Pi 3, such as its older hardware, 10MB/s upload speed, and limited RAM, the NAS is slower compared to commercial cloud storage solutions like Google Drive and Dropbox. Despite these limitations, the setup remains useful and efficient for basic storage needs. One potential future extension of this project would be to build a custom web panel that allows me to interact with the NAS similarly to Google Drive, complete with password protection for enhanced security and privacy.
ConclusionIn conclusion, my experience with the Raspberry Pi has been both educational and practical. What started as a gift during middle school, when I was unsure of how to use it, has transformed into a versatile tool for various projects. From network-wide ad blocking with Pi-hole to hosting my personal website using Nginx, and even setting up a NAS for shared family storage, the Raspberry Pi has proven to be an invaluable resource. Despite its limitations, the Raspberry Pi offers an affordable and efficient solution for tasks that don't require extensive computational power, and its ability to integrate various services seamlessly makes it a great choice for personal and home network applications. However, I will not be using this old Raspberry Pi for anything heavier, as it is already quite loaded with its current tasks. To support future projects, I bought a second-hand Raspberry Pi 4 with 8GB of RAM at a cheap price, which will allow me to take on more demanding tasks without overloading my current setup. This hands-on experience has deepened my appreciation for miniboard computers and demonstrated how they can be leveraged for a variety of practical purposes, even in a home or small-scale environment. I look forward to expanding on these projects and exploring new ways to utilize the Raspberry Pi in the future.
Recent
Hosting, NAS, and DNS block with RPi 3
Introduction
A Raspberry Pi is a small, affordable single-board computer developed by the Raspberry Pi Foundation, initially designed to promote computer science education. First launched in February 2012, the Raspberry Pi has since gained significant popularity, not only for educational purposes but also in commercial applications. Companies today use the Ras...
Designing cemyilmaz.tech
Frameworks used: SQL, Flask, Python, Bootstrap 5, Nginx, Javascript, HTML, CSS.
IntroductionThis article provides an in-depth analysis of the current website's design choices, covering aspects such as overall design, mobile integration, implemented security measures, implementation decisions, and the website's intended f...