Saturday, August 19, 2023

2023-08-19 - Pi Hole Project pt1

ero I probably went about this the absolute worst way. Ever since I saw a video on Pi Holes a few years back, I have wanted to make one. I already had a Raspberry Pi 1 B+ that I had never managed to do anything. At first, I bought it with fascination and then couldn't figure out how to use it. 

Then a few years later when I had a few roommates that were into this kind of thing like me, we thought we'd set up a media center for the living room. So then I figured out how to install an Raspbian OS on it, and we thought we'd install Kodi for whatever we wanted to watch. We got into Kodi and it was painfully slow and never actually played anything no matter what it was. 

I discovered a kodi based Pi OS where it was just Kodi as an OS media player, which I thought was perfect. How could we get any more lightweight than this? We couldn't miss! It was still too slow. I couldn't figure out what the deal was. What the heck do other Pi users do if this thing can't run anything? I eventually concluded that it was one of the oldest models, and so everything you can install then in 2017 was just too big for the older models or something. I gave up. 

Then a few years layer, I decided to make a Pi Hole I think, and I installed Raspbian, and I had no other screen to plug it into other than my 4k TV. It was so incredibly slow that I was sure that te problem was the 4k resolution, because it took fifteen minutes for the Pi to register even a single command like clicking a button to a menu. I messed with it for hours before I concluded I had to get a lower resolution second screen, which I already had need for, but I didn't have extra money for that sort of thing for quite a few years so I just had to keep it on my wish list to eventually be fulfilled one of these days. 

Finally I had spare money for things like this, so I bought a second screen for my laptop, which I also had every intention to be able to use with my Raspberry Pi. And when I got the second screen, I promptly plugged it into my Pi. It loaded, it wasn't as slow, but I noticed that it was still slower than was comfortable. But it still worked and I didn't want to waste this Pi, so I decided to go forward anyway. I had originally heard of this idea when Linus Tech Tips made a video about it somewhere around 2019. I tried to follow their video when finally I discovered that they had a blog post to accompany the video for anyone that wanted to follow their step by step instructions. So I started doing so. 

It worked! Just kidding, this also had bad results. So I started following their instructions but ever so often here'd be an instruction that didn't apply to me for one reason or another. Like they started by giving instructions on how to install the OS in a way that would allow you to set it up through SSH, a method of accessing a device from another computer which I believe came from Linux and other OS's have adopted it because it was so useful. 

I also noticed as I was using the Raspberry Pi Imager and discovered that if you wanted to do SSH, all you had to do was check the SSH box accessible through the gear icon along with passwords and all that stuff. So I started to figure that a lot of this process had been streamlined since Linus's video. 

I had my second screen, why would I do this? So when they were explaining accessing the micro SD card and creating a folder in a certain place and labeling it a certain thing, I decided I could just skip that step. It never occurred to me that the rest of the installation process would be according to the SSH method. SO they went on explaining SSH based explanations and I started trying to convert their instructions into the method I would use with a GUI. This started to get too complicated really quickly. 

Also, Linus Tech Tips used a Pi Zero, but I think they insisted that you could do it with any Pi. So I thought I was good. Then I hit another brick wall, it was just too slow. And problems were starting to compound on top of each other. So since my Pi B+ starting to obviously be slower, I realized that this was a problem that had been plaguing me with every single thing I had ever done and I finally realized that either I needed a new Pi or I had to strip the process down as far as I could.  SO I obviously made it more difficult for myself and chose to strip the process down instead of getting another Pi. Anything to save money and use this device I already owned. 

I reinstalled an OS that had no desktop environment. I thought, I suppose I could try to do all that command line stuff. I'll just follow instructions and it should work, right? I finally hot the point where I needed to access my roommates router so that I could input some IP addresses. But he worked the night shift and was asleep, so I reluctantly gave up for the day because he's hard to get ahold of. 

It took me like a month or two to finally hook up with him and discuss accessing the router. And despite his usual accommodations, he drew the line out of nowhere. He was fine with this a few months earlier and apparently he had time to think about it as he is a control freak, and so now he won't. He didn't want me accessing his router myself on my computer, he didn't want me accessing it without him, and finally he didn't want me accessing it at all. The only way that he would allow anything to happen is if he was on the phone with me while alone in his room, accessing his router by himself and I could give him instructions. 

I immediately thought this would be a nightmare because even though he has built his won computer, the funny thing is that if you want it yourself you are far more likely to do it and try to figure out how. Since this is a favor to me, I can easily see the large potential for him to only half caringly try to solve any problems with me over the phone. Like I could tell him to look for a button and it's not immediately noticeable so he just says that its not there and then blows me off because he doesn't want to apply himself under his own limitations he's placed me under.  

I was devastated but a few days later I decided to try anyway. He did say he would do that much. And then I swore to myself that I was going to return to this as soon as possible. I never did because I fretted the notion that I would deal with more and more brick walls. 

Don't worry, this problem has plenty more brick walls. I had gotten the idea for this tech blog from someone at my technical college I attended a few years earlier. While there, we discussed coming back a second time because the IT program had been completely revamped since I was certified and they now offered things that would be really useful to me. So I decided to come back and the guy happened to recommend this social media thing. I decided that I was going to start a blog to demonstrate to employers that I had experience by posting about tech projects. The Pi Hole was going to be my first project among many that would give me any real kudos. 

I was working with a guy that was in the same situation as me, who wanted to work in IT, and I thought maybe we could go in on this together. He came over to work on the Pi Hole with me so he would know how to do it too, and maybe even create his own blog or something and whatever help I needed, he would be motivated to give since I was in unexplored territory, and I even tried to convince him to buy his won Pi to make  Pi Hole out of. I invited him over and for some reason, right before he came over, it just occurred to me that I should just completely start over. I had run into so many brick walls and I was tired of it. So we looked at how to buy a Pi Zero Wireless. After all, Linus did it with a Zero. 

I got my Pi Zero. For some reason, when I ordered it, it never occurred to me to check its specs or ports or anything. Why would I need to do that? Any Pi can be a Pi Hole. 

When it came, I rushed to the mail box to get it and discovered I didn't have a key. I had so much trouble with mail carriers that they wouldn't give me my mail for completely arbitrary reasons even if it was First Class mail. One guy wouldn't deliver it because my name wasn't on the mailbox. In my entire life this had never been a problem. I started having all my stuff sent to my moms house and this problem strangely ended even though my name was never on her mail box either. So I never had a reason to go to the mail box. My roommates always did that. But I wanted the Pi as soon as possible, so for the first time ever, I had it sent to my address. 

It arrived...on a Saturday. When I realized I didn't have my key, I asked my roommate, the same one that the router belongs to, if he could take a picture of his key so I could match it with all the keys I had. He refused. Why? Can I borrow it? No. Can you get the mail for me? No. Why? Because mail doesn't come on Saturdays. I showed him the notification saying it was delivered. He said, well, I checked it yesterday, I check on Fridays, and so I'm not checking it again till next Friday. So you never check it between Fridays? No. We argued for about 30 minutes. 

Why am I using his router at all? I am really questioning this. He's just arbitrarily overcomplicating every single tiny thing that involves his stuff. 

I finally said, okay, its your key, there's one key, you get to dictate the key. But it is not your mail, it is my mail. You don't have the right to dictate my mail. And he finally said that he was going to check the mail before he went to work tonight. Why didn't you just say this at the beginning? He backpedaled and claimed that it was because we were arguing. I didn't remind him, but he was unwilling to check until next Friday. He asked me if I could admit that he won the argument. I said in astonishment, "Sure, you won the argument, as did I." "Well, but I want you to say that I won." "Well, you did, it's just also the case that I won too because apparently, we both got what we wanted." 

I invited Scott, my co-worker, over to work on the Pi with me a couple more times. First time I realized that the Pi didn't have a full size HDMI port, so I had to buy another cord and then invite Scott over again. I also noticed it didn't have a network port. Well, Linus did it without a network port. I did some research and people recommended keeping it hard lined, while admitting that it uses very little throughput. So I got the proper HDMI cord and a case because whatever happened to my first Pi could have been impact damage for all I know. And the case I bought also came with adapters, and an on/off cord since Pi's don't have their own power buttons. I also got a USB hub with a few spare ports since all the Pi Zero has is two micro USB ports, and one of them must be used for power. So I got this hub that had a few spare USB A ports and an ethernet port, figuring USB 2.0 would have sufficient bandwidth for something that doesn't use much of it. I was lucky, I didn't realize the hub was powered, and that it could bus power the Pi. So finally a break! I would end up wondering later about buying another power cord. Then I invited Scott over and this time, the Pi wouldn't load. There was a square screen ratio, displaying rainbow colors, and the screen was flipping on and off repeatedly without stopping. I tried troubleshooting the problem with Scott and we were stumped. 

A few months later when term started at MTEC, I thought I would go to my instructor over this and this last week, term started, and I had a chance to talk to him about this problem, which he was eagerly willing to help me with. He has set up many Pi's himself and would be happy for students to bring in projects to work on. I asked if he thought this could be a power cord problem and he said no, you got to the rainbow screen and that indicates that its getting enough power. I was elated. My USB powered bus powering hub not only powers my Pi sufficiently, but he would help me solve the problem. 

Thursday is project day. Thursday came, we started working on the Pi. He decided for me that we were not even going to bring the second screen because like Sean Connery says in Hunt for the Red October, "When his men reached the new world, Cortex burnt his ships. As a result, his men were well motivated." My instructor wanted me to do everything over SSH. I reluctantly went with his plan, left my screen at home as he insisted. We were loading a fresh OS onto the Pi because we needed to put the student network credentials into the Pi Imager settings so we could do SSH. I was going to install a 64 bit OS when my instructor stopped me and said hey, the Zero is only 32 bit. 

I was stunned. This is unquestioningly the reason why I couldn't get passed the rainbow screen! My instructor told me to install Zenmap so that when we connect the Pi to the student project network, we could identify all the devices on the network and find out our IP address so we could SSH into it from my laptop. It's important to note that this only works if the computer you're doing Zenmap on is on the same network as the Pi. We did the best we could, doing multiple network searches and none of them produced any returns. We eventually got this resolved and put in the right settings, apparently you want to go to the drop down menu and select Ping Search and you want to make sure you enter the right IP address, which is the host of the network, which you want Zenmap to search in order to find the device connected to it. The IP address for this in any network should always, to my understanding, be 192.168.1.0/24. It produced many results now but the only Pi that came up wasn't ours. Zenmap lists the name of the device along with the Mac Address and IP address it was assigned. 

One of the projects that another student was working on caused the class project router to fail and we were once again stuck. so with this and nothing else, I thought I would try again at home since my instructor then gave it to me as homework over the weekend that was due the following Monday and he was going on Vacation. He said to just follow the video that I was now following. I found a more recent one labelled something like "Greatest Pi Hole ever" or something. And this guy was using a Pi 4 I think so he never mentioned the problem with 32 and 64 bit Pi's and the corresponding OS.

So I invited Scott over again and we couldn't find the Pi on my network. And we had reinstalled the OS so many times, that if I bring it back to school for help, I will just have to reinstall the OS again just so we can change the network credentials for the schools student project network. Well, I know I have other micro SD cards. I thought I would save myself some almost certain headaches and get another card to install the OS with credentials on at school so we can finally have this ridiculous problem behind us and just focus on getting the Pi set up without wasting time reinstalling again and again depending on where I happen to be when I'm working on it. 

Am I inexperienced or incompetent like I thought? Haha. Hmm.

He also sent us home with what is called a Hybrid assignment because it is supposed to be done on Fridays since there's no class at school on Fridays. We're supposed to do work from home at our leisure. This homework is broken up into a group project where we all do research on new Tech and report back to each other on it Monday. This should only take like an hour to do the research and write the half page on, so I took 4 hours and am still not finished. 

2023-08-26 - Update

.So I went to class Thursday and got help from one of my instructors on my Pi. I decided that in the name of actually making progress, which turned out to be a good call, I decided to ditch the SSH portion of the project for the time being so I ca get a working operating system on my micro Sd card and get the thing running and the Pi Hole software installed. This didn't happen without a few bumps in the road however. 

I had a micro SD card that I had been using for this project for a while now and when I started reinstalling the Pi OS on my card multiple times...not because of any errors with the installation or whatever, but because I was going to get this done in class which didn't happen last week because the student project router went down, and then I was sent home to do the project over the weekend, again reinstalling the OS merely because we were going to SSH into my Pi which required finding the IP address through other devices that were not my Pi, and this simple problem couldn't possibly be done either at school or at home because I was so unfamiliar with the process of doing SSH anf obtaining IP addresses for networks, I decided I needed to find my old micro SD cards I hadn't used in about a decade for hardly anything. It took some time but I found them and tried them and discovered they were all shot. I suppose their internal batteries died trying to maintain the data I had on them and so they're now useless. 

So I borrowed some money to buy a few micro SD cards and never imagined that I was going to buy more of them so I only bought two. The cards had not arrived in the mail yet by the time project day came around but I wasn't very concerned because I did have one working card. And then we had to reinstall the OS with the latest network credentials  in case for whatever reason I did want to SSH into the device. But in hindsight this was unnecessary and proved to also be a huge problem. I bricked the card while trying to wipe it with Diskpart from the Command Prompt and learned the hard way that this was unnecessary as well. Why was I doing it, because someone the week before said that it's more thorough than reformatting a drive the normal way. Now I bricked my one good card. My instructor grabbed this Pi cluster from another class project that no one was using and we continued on our way so this project could just get done already. 

I then realized I needed to have a bunch of backup cards on hand for when things like this happen. And in order to finish this project I really did just need to buy my own router so I don't have to go through my difficult roommate. My instructors said Wi-Fi 6 wasn't necessary and would likely be way too expensive, but a Wi-Fi 5 router should be fine while still being reasonably fast. Apparently a wireless access point and or a switch, even a smart switch doesn't create its own network for a Pi Hole to operate with full coverage for. I would be forced to set up the Pi Hole on every individual device which is way more work. Switches and Wireless Access Points only extend the network that already exists, and I need a whole network for a Pi to run with. And switches and APs don't do anything but extend the network so I would have to buy a router which creates a private network. 

Without realizing the OS I was installing had no desktop environment, we continued on and it ended up ;not being that big of a deal, everything we wanted to do was on the command line anyway. I had brought my own screen for the Pi to plug into, forgot my mouse and keyboard, and then discovered that the bus power or passthrough power that my usb hub I bought for the Pi couldn't both power my Pi and provide data connections. So we had to figure out how to get creative with the plugs I had available. Since  the OS lacked a GUI anyway, all I needed to plug in was a keyboard, so the hub wasn't necessary. I can't believe it, I had luck with this project probably for the first time. 

Then we had a problem. We couldn't use the student project router again because it went down again like the week before. So we connected to the school wide network on my Pi. Then we went to "docs.pi-hole.net/main/basic-install/". It told us to use "curl -sSL https://install.pi-holenet | bash" (or what we'll be calling the curl command, but when we did this, the Pi wouldn't allow us to type the pipe character "|" and we tried all the keys on the keyboard that are used for symbols since the pipe key wasn't working in Debian Buster Linux 32 bit for Pi's. We discovered online somewhere that holding the right alt key and pressing the key to the left of the "1" key would create the pipe character in this OS. 

When we got everything correctly entered and searched, the Pi wouldn't load the site. We had no clue what was going on. I wish I had taken a picture of the screen but it slipped my mind. In the middle of this, it grave us a reference site to look up the problem that displayed for why it wasn't loading. It told us that it was a certificate error. I didn't know this until later, but at this step, before you even search the pi hole software download and install, you're supposed to update everything on the OS. So we did this now, typing in "sudo apt update". 

It was now that I thought about getting a picture of the error from before, and in trying to do this, we retyped the curl command to try and replicate the error so I could take a picture of it. But our luck chose to kick in at this point because for some reason even though we never actually commanded the Pi to install the update, it worked and the certificate error was never replicated. We didn't know at the time that we should still do the update regardless until later so we moved on. 

We came up on the point where it wanted me to enter my credentials I put in when I installed the OS image onto the micro SD card. But this was confusing to me because I chose "pihole1" as my username and I thought it was just asking for my password so I typed it in without success. A minute later I typed in the username the command line was already showing me and it worked, it accepted my username, and then it asked for the password. This temporarily threw us for a loop when we tried entering the password because the password wasn't appearing on the line when I typed it. 

Suddenly we remembered that Linux doesn't show the password when you type it, it just remains blank and then you press enter and it works. When my instructor said this, I said, "Ohhhh, I remember that from when I ran into that problem back in like April or whatever when I tried this the first time." 

Then we typed "ip a" to get the ip address. And we didn't have this next problem, but according to Crosstalk Solutions on Youtube, if after installing the updates on the Pi the IP address didn't come up or it was wrong, a reboot should fix this. Again we didn't install the updates even though we searched and downloaded them so we didn't have an IP address problem. 

It was now that the PI Hole software was installed that class was over so we considered this a success. It was later that I realized the harder part of the Pi Hole project was still ahead of me. But I have to buy that router first. 

On my way out, and since MTEC has a security guard for some reason, who happens to also be taking this same class as me, I told him about the Pi Hole and he told me something I hadn't learned. For a few years now I have been wondering how to implement this Pi Hole on my iPhone when I'm out and about. And I always just thought, well, I'm not going to keep my phone, wallet and keys and then a Pi with a power bank and a wireless hotspot in my pockets everywhere I go. So I just figured, well, I'll at least get to enjoy the benefits of a Pi Hole when at home, just not when I'm out. And then this security guard dude told me, "Yeah, just wait till Doug [our instructor] has you create a VPN of your own and then set it up on youyr phone so you can tunnel into your home network and be able to use your Pi Hole on your phone when your away." My eyes widened. "Really? Of course, I have to do that!" 

So apparently this project is expanding before my very eyes even before the initial project is over. I wonder how a privately made VPN plays with a commercial VPN like Nord. That could be a problem. How do you tunnel somewhere on a computer that's in a network with a VPN? I need to peruse this before I get carried away. I'm putting the cart so far before the horse that the horse doesn't even exist yet.

2023-09-01 - Update

So I went back to yesterday, Thursday, and to my horror my instructor, Doug, wanted me to do this over SSH again. We had already burnt nearly an hour getting into teams and discussing our weekend homework. But on Monday when Doug came back from his week long vacation, we discussed what another one of my instructors, Brodie, discussed with me, that since my roommate was getting in the way of configuring the network for a Pi Hole, I could just get a router of my own. So when Doug returned, he agreed. 
I asked advice on what router to get and he said that really any router would do. But I pointed out a few and there were two that it came down to, one by Linksys and one by Asus. At first they were both forty dollars but when I went to buy them Monday night or Tuesday morning, the price had risen on the Linksys and that sort of determined which one I would buy, since they were both the same and the Linksys was bragging about having MU-MIMO technology, which basically every router has, I thought that was a dishonest way to get more money out of me when things are already really expensive. It wasn't long ago that all this stuff was something like thirty dollars. 
So I ordered it, hopefully to have the router shipped by Thursday. And it was, just the afternoon before class started. 
When Doug and I got to work on it, he was stretched across about 20 students so I didn't get much of his time at any one time but I showed him the router I just bought and he said "Great!" 
Despite having told him my nightmare of trying to get this Pi Hole done for nearly six months then failing the first week of class with the added complication of doing it over SSH, he then said, "Now, let's install PI Hole over SSH!" I was grabbing my Pi and some cords when I realized what he said, and in confusion, then worry, I said, "Wait, you want to reinstall it? Start from scratch again?" 
"Yep, and this time we'll get it done, and have it configured with your router."
I sighed and started fumbling with what I actually needed since now we didn't need HDMI cords for portable screens and all that. 
I had already installed the Pi OS on my Pi...probably no less than fifteen now since this whole thing started, so he went ahead and grabbed my new memory card I just bought since we fried the other one last week and went to install it on his laptop before getting called away again. 
I started logging into my router with some minor hiccups. I wasn't used to the idea that you didn't have to log into the router and then immediately navigate to the settings to change the password--because the settings to do so were on the initial log in page. Then a couple of students, once again like the past two Thursdays, took down the router and my SOHO (Small Office Home Office) router was plugged into it. So internet was spotty. And since they took it down that first time, right after I changed the password, neither my new or old credentials worked and I had to reset. My rule of thumb for resetting a device since so many of them seem to require a different amount of time holding the reset button, I always do at least 45 seconds but typically add five to fifteen extra seconds on top of it if I have the patience just to ensure I don't have to reset the router again. It doesn't really matter that much but if ever someone asks if I held the button down long enough, "Yeah I did." How long, "I counted a whole minute for good measure." 
It took a few minutes to reboot, then the immediate option to change the password and username came up. I did so. But I was confused because there was a dropdown menu for 2.4 GHz and 5 GHz, I sort of thought that the router just used whatever worked best automatically but this made it look like it would use one or the other. And when I decided to try them both out for a while, after having inserted my new router credentials in, all the sudden, the default credentials were back as if I didn't put them in at all. After a few minutes, Zack told me that I have to set the credentials for the 2.4 GHz network and again for the 5 GHz network because it broadcasts both simultaneously. Suddenly it made sense, oh yeah, that's what my roommates router does. So it took e some time to get everything configured for both networks since it would do it, say it was done, and then my laptop would lose WIFI since I was using my routers network to log into it, and then I had to reinsert the username and password in my laptop WIFI settings both times, in fact I feel like I did it like five times and after each try the router would take a few minutes to boot back up and then be discoverable on my laptops WIFI list. 
I recorded my password. Then I had to create an SSID (WIFI name) and password and Doug suggested even though it was an Asus router, I could do "Abraham Linksys". I thought it was clever but not my thing. I had an idea for a kind of dirty joke. It ended up wasting a whole half hour of my time as I tried to decide if I wanted to do it or shorten it since it was long or if I wanted to use something else. Instead of wasting a bunch of time browsing through sites, I asked ChatGPT for a list of funny SSID's:

"The LAN Before Time"
"Drop It Like It's Hotspot"
"Pretty Fly for a Wi-Fi"
"404 Network Unavailable"
"This LAN is My LAN"
"Silence of the LANs"
"Get Off My LAN!"
"No Free Wi-Fi For You"
"The Promised LAN"
"The Internet is Lava"
"The Wi-Fi Awakens"
"Abraham Linksys"
"Wu-Tang LAN"
"LAN Solo"
"The Matrix Connection"
"Skynet Surveillance Network"
"Nacho Wi-Fi"
"It Burns When IP"
"John Wilkes Bluetooth"
"Hide Yo Kids, Hide Yo WiFi"
"FBI Surveillance Van #3"
"404 Wi-Fi Not Found"
"Clever Wi-Fi Name"
"The Password Is 1234"
"Virus Distribution Center"
"GetOffMyLawn"
"Area 51 Secure Network"
"TellMyWi-FiLoveHer"

I settled on "The Password Is 1234". Doug said, "I think you're going to get hacked." I said, no, that's my SSID, not the password, and he said, "Oh, ok" with a smile. 
Then it came time to get my Pi Zero 2W connected over WIFI. He was busy, and I still didn't understand how to use ZenMap to find the IP address for certain devices on a routers network. So I turned to Zack who helped me last week and he was about to when suddenly, Doug appeared over my shoulder and said that it wouldn't be necessary. While logged into my router, I can simply look to see what devices are connected to it and what their IP addresses are. He ran off again to help another student and I grabbed my Pi to get it plugged in and connected to my router, but it wouldn't turn on, and Zack and I were playing with plugs and power button cords for the Pi my case came with and couldn't figure out why it wouldn't turn on until I realized, wait, did Doug finish installing the OS? I checked to see if the memory card was back in the P and it wasn't. 
So Doug must still have the memory card. Doug was still with other students and so I was trying to figure out what to do to get going. I assumed he already installed the OS, so I just need to grab it and get going. I was looking for the little card reader we were using last week and checked his laptop and nothing was plugged into it. I saw a memory card on the desk next to his laptop but it wasn't mine. I went to Doug to ask him where the memory card was and he then jumped up and went to his laptop, pulling the memory card out of his pocket to install the OS. Oh no, I wasted a bunch of time and there's only an hour left of class. This is probably going to use ten or fifteen minutes. He asked for my WIFI credentials and I gave them, he already had the imager up and ready to go with most of the options selected and he just needed my SSID and password so some time was saved. The OS was installed within the next few minutes and he handed me the card. 
Now, last time we tried to SSH into the Pi, we had to use ZenMap to discover what IP address had been assigned to it by the student project router. But since we were using my own router, which wass plugged into the student project server, this was unnecessary. All I had to do was log into my own router and obtain the IP address it had assigned the Pi. But before we were going to find out what the IP address was, we needed to assign it a static IP address, which unlike a dynamic IP address which is subject to potential change, it is likely to do so often depending on other clients that come and go on the network. You want to assign certain clients on the network the same IP address at all times so that the configuration for them remains the same. If your IP printer or IP phone were to change IP addresses with a dynamic address from the DHCP server or router, that means that a print order won't be able to find the printer because the computer knows that the printer is at a certain IP address. Or if other clients come and go, the network might max out and there won't always be enough available IP addresses for the printer. And IP phones are identified by IP address as well, so you need calls and print orders routed properly to the right devices and they need to be reliably received by that particular client. And a Pi Hole is an example of a network client that shouldn't be subject to change. 
I logged into the router and we set about to give the Pi a static IP Address, and find out what it was so we could access the Pi over SSH. Under advanced settings on the left side panel, I clicked LAN.


Under LAN go to the DHCP Server tab. 


I scrolled down to the bottom of this page to find "Manually Assigned IP around DHCP list", which confused me at first but it means static IP addresses that "go around [the] DHCP list".



On my Asus router, on the main page under General>network map, there's a button to view a list of the clients connected. 

 




Then we typed "ssh [username]@[host_ip_address]." This gave us access to my Pi's terminal. When we loaded up the OS in the Imager, it includes the option to enable SSH, and also set a username and password for the Pi as well as the option to input the desired wireless network SSID and password so that when the Pi loads up, it automatically searches for the network and connects to it after it finishes booting. We had some difficulties with this because the router went offline a few times while other groups of students worked on various other projects. So we kept on having to reconnect to the network many times and my laptop would automatically switch back to the schools regular student WIFI network without us knowing and then none of our commands would work, giving us confusing results to out commands. But we persevered and got through it. Eventually we realized that we were on the wrong network again on several occasions. 
For this reason I kind of recommend what I'd do if I were to do it again, I would turn WIFI off on your computer if you're using it in this process, and hardwire in on the router from the computer you're using to SSH into the Pi on the same network. I would also sort of prefer hardwiring the Pi as well but I bought the Pu Zero without even thinking about what ports it had available. I'd normally put a magnified glass to anything I was about to buy that wasn't already a known quantity, however in this particular case I disregarded my usual routine because Linus Tech Tips said that you could create a Pi Hole with a Pi Zero. 
Then we got this message:


I was befuddled by this but Doug has set up many Pi Holes and has apparently run past this problem many times. The solution for my Windows machine was to go to my C drive and type in the file path
"C:\Users\[username]\.ssh\known_hosts" and delete the file in that location because a certain network configuration was already set. 
So whenever you make an SSH connection with another computer, as a security feature, there's what is called a fingerprint that is given. So if for whatever reason you change the Pi or re-image the OS, that fingerprint code gets changed. So if you try to connect to another device and the expected fingerprint was changed then the computer won't connect. And deleting the Known Hosts file in the hidden file path will reset the fingerprint so you can access the device again. After we deleted the hosts file, it asked us for the Pi device password I gave it when imagine the OS, we typed it and as usual, the password was invisible for security reasons. 
And of course like last week, when we did the curl command "curl -sSL https://install.pi-hole.net | bash", it didn't load the site but this time it was because I forgot to type the dot between hole and net. So I automatically assumed it was because we didn't update the Pi yet, so I was going to do so and decided I wanted to try the shortcut where you can look up the updates, install them and give permission for them at the same time with one command, which is "sudo apt update && sudo apt upgrade -y". 
I believe the student project router went down again here because it started to download all the upgrades to install them but failed partway through before letting us know there were a few errors. Then it failed again because I accidentally typed "-yes" instead of just "-y". It also didn't help that I accidentally typed "suda" instead of "sudo" for the upgrade. We typed the commands separately to update and upgrade.
It then read out "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." This usually means everything was upgraded so we did the curl command again, we had network issues and did the curl command a number of times because we were waiting for the router to finish booting but when it did come back up, we concluded that it still hadn't updated and so we ran the sudo commands again. This time it actually updated and took a few minutes as one status update after another splashed across the Prompt. 


Then we did the curl command when it was done. 



If successful, in ASCII art you'll see a red and green Raspberry. As it went along there were a bunch of questions in a new window that it needed answered. You'll see that after you answer them and the new window disappears, those options will appear indented and separated from the rest of the Terminal commands and executions by long lines of hyphens.  


When it finished installing, it provided a web interface password which must be recorded in order to access the Pi Hole interface for monitoring and adjustments. 

We then had to go into my router and put the Pi as my DNS router. For my Asus router, we went Advanced side panel > LAN > DHCP Server tab along the top of the page > scrolled down to DNS and WINS Server Settings > input the static IP address of the Pi in the DNS Server box. This makes it so that whenever a DNS request for something goes out, the router first sends it to this address which in this case, is the Pi, which is running Pi Hole, which will drop any IP address request from a DNS server (the Pi Zero running Pi Hole) into a DNS Hole. This can also be done with IP addresses associated with explicit material as well as unsecure sites. 
???????



We logged into the Pi Hole web interface by doing a web search for the IP address of my Pi; which was the static IP address my router permanently assigned it when we switched it from automatic (DHCP) to manual (static or permanent). And here's where you need that password that was given at the end of the Pi Hole installation in the Terminal. 


Here's what the interface looks like after it's been used for a little bit. 


***********Add how to add a domain for blocking ads here!!!!!!!!!!!!!!

To ad block lists, we went to Adlists on the side panel of the Pi Hole interface. 


Here we scrolled down a bit till we found the box containing the List of Adlists. 


The first ad lists we added were from GitHub Steven Black. To add it, we right clicked on the link for the adlist and selected Copy Link Address. 


Later we went back to GitHub and searched for more adlists from the Block List Project. 



We had to scroll for quite a ways until we found Main Lists, and you want to download the Original links on the left-most column. 
Now I want to add here that the Block List Project had all sorts of really cool block lists you could add to your Pi Hole. There were ones for porn, torrents, piracy, phishing, malware, abuse, redirects--which are things that redirect you away from your intended webpage, and there were a couple of really cool ones for Adobe, which block telemetry and another for your smart TV which blocks a lot of the crap that's sent to your smart TV. Just make sure your TV is on the same network as the Pi Hole. But just so this story makes sense, we didn't add the Block List Project links until near the end of this project, until after we also created the VPN, at which point, the Pi Hole seemed to have stopped working. But lets rewind back to the point where we had just installed Pi Hole properly for the first time and were testing before then, we were having trouble even telling if the Pi Hole was working at all. t with just the Steven Black adlist. 

We got to this point where we were looking at the interface and there was no status on anything, no queries were being blocked or anything. So since class had been over for like a half hour or so because Doug decided we needed to finally just push this through and get it done, the lights were off, password entered, everything was blank, web searches were attempted, and nothing worked. But this turned out to be because of the darn student project network router in our classroom that was plagued with problems because of all the projects due to students not knowing what they were doing. I didn't have internet but my own little network my router created was up and working fine. Doug said I could take it home and plug it in and everything from that point should work fine. 
So I took it home with concern that it wasn't working, in fact I was reluctant to change my network in my bedroom at all. So I plugged the new router into my switch, and then I went back on my laptop and connected to the router again, internet worked, I was able to connect to the interfaces on both the router and the Pi Hole, and so I performed a few wen searches. 
Now, I didn't actually know where to go in order to find ads. I see them all the time, try to ignore them, or simply avoid websites that have too many things in my way, course this is usually things requesting that I turn off my adblocker or ask for a subscription. I am new at this but my assumption is that due to the clever nature of dropping into a DNS hole all those ad requests from software running on my devices, the only requests I should be getting to turn off my ad blocker should just be for the browser based ad blocker, and not my Pi. However, it is unfortunately the case that Pi Holes don't block everything. I only found this out as I was leaving school to go plug the router and Pi in at home that Youtube has found a way to circumvent Pi Hole usage by simply hosting its own ads locally on its own site. So no requests are going to be going from my device out onto the internet for ads that can be dropped into a DNS hole. Instead what happens is that just like videos are sent to my device, so are ads, right along with the videos. So at least in this case, ad blocker is still very useful until Youtube decides to attack that too, which I recently heard from Louis Rossman on Youtube, that they were. However, my understanding is that for some reason they haven't done that yet or decided against it or something. This was a few months ago. 
So I asked ChatGPT where I could go to test my Pi Hole and it gave me results. But I was unsatisfied with them. Usually I do the google search first and then resort to ChatGPT but this time I resorted to google and found a Reddit post on this very topic, which had a link to an ad server. I think the poster said that if you didn't see ads then it was working. Well, I clicked on it, and not only did I not see ads, the link didn't even open. I considered that either this meant the Pi Hole was working perfectly, or there was an error. So I clicked on it several times. It never opened. 
Then I scrolled down still somewhat dissatisfied to see what commenters said and one of them said that this link could provide confusing results. Well...ha. He then said to try another thing, and I'm not sure if it was him or the next commenter, but someone said to try CNN.com, as apparently they have lots of ads on their site. I've never searched any news sites so I went for it. No ads. And it wasn't as flashy a result as I was hoping for, I thought there'd be side panels all up and down both sides of the page or something and they would be blank from the lack of ads, but there was really just one or two spots that would have ordinarily had ads and didn't because these blank spaces were grayed out with a light gray, and in the middle, text that said "ad". 
Well, I went back just now and those blank spaces were filled with ads again. Oof. Here we go again. Another brick wall. 

This has been Truncat3d 00000000111100010100110______________end of line

2025-07-10 - BYU Wi‑Fi captive portal troubleshooting

  BYU Wi‑Fi Captive Portal Troubleshooting What happened I had used BYU Wi‑Fi just fine before, but at some point, the captive portal star...