BizHostNC IT & Networking

Network Wide Ad Blocking for Small Business

Small office networks are often not very complex, and don’t require much hardware. There are ways to improve your small business network, by using a network-wide ad blocking system that works as a DNS resolver. We have come up with a budget friendly and effective way to implement Pi-hole into your small business network.

What’s required to implement a Pi-Hole into my small business network?

  • Raspberry Pi Zero W
  • 16gb Micro SD Card
  • Micro-USB Data Capable Cable
  • Raspbian Operating System (Or another compatible OS if not using a Raspi Zero)
  • Headless Setup or an HDMI Mini to HDMI cable

Alright, so this guide is going to assume you have already setup a headless install of Raspbian on your Rasperry Pi Zero W, or you have a HDMI connection setup on your monitor. If you need some how-to guides check out the link below.

Headless Setup of Raspberry Pi (Connect o Pi via SSH without monitor) https://dev.to/vorillaz/headless-raspberry-pi-zero-w-setup-3llj

Since you are already setup on your raspberry pi, go to your bash command line and type the following command to start an automated setup script.

curl -sSL https://install.pi-hole.net | bash

This setup script can take some time, some people reporting upwards of 20 minutes. Just let it do it’s thing for awhile and it will let you know when done.

Now, it’s time to start on your configuration. Start by choosing who will be your upstream DNS. We recommend Cloudflare or Google for most small business networks.

Then you will want to select the type of IP address setup you require, most all small business networks only use IPv4.

The installer will try to find the current subnet and assign a static route to the Pi-hole from the dynamic IP address provided from your router. If you have advanced network settings, you will likely need an IT professional to modify configurations.

You will be asked if you wish to install the web interface, and we recommend yes since this is a headless install. How else will you manage your DNS driven Network-wide Ad Blocker?

Now, it will finish up the installation.

When it’s finally done with the installation, you will need to copy/paste the details from the terminal and store them somewhere safe. It will be required for initial login to the web control panel.

Now you can simple visit the IP Address listed on your setup. You will login with the provided login password. Some networks can also be setup to access the Pi-hole via http://pi-hole.local

Now you can login, update your blocked domains in the “Tools” menu and manage any Whitelisting you wish. The final step is to configure your Router or each PC you wish to implement blocking to use the IP address of your Pi-hole as the DNS server. Below is an example from an iPhone.

Have questions? Need help? We are here for you! Contact BizHostNC for small business networking and web hosting.

Monitor your Home Lab Temperature & Humidity Environment with ESP8266 and DHT11 Sensor

Ever wanted to monitor ambient temperature and humidity in your home lab or server room, but didn’t want to spend money on something extravagant? Most guys who work with electronics already have these parts laying around whether in a kit, or just deals. Otherwise you can get these parts for under 10$ and put this simple piece of hardware anywhere you want to monitor temperature and humidity. The footprint of the hardware is quite small, and we have implemented ESP8266 deep sleep to reduce the amount of power usage as well. Our setup is monitoring the temperature in our home lab, which has quite a few electronics running and we like to know what the ambient is to ensure our GPU and CPU temps are stable. We also have this same setup running at multiple businesses on closed networks for their automation.

The code I am using is written in the Arduino IDE, so you will have to download it. The code is quite simple, it will read the data from the sensor; then send that data to a ThingSpeak channel. This will allow you to aggregate the data somewhere central, without fighting a bunch of local servers and code. It works great, and allows you to send your data and deep sleep for your required delay. We will add more technical data and information as this post matures.

You will need to have, or order the following parts:

It’s quite simple, wire up your ESP-8266 NodeMCU with 3v to the positive pin, Ground to the Negative (-) pin, and then your Sensor pin will go to D5 on your NodeMCU.

Then, you will need to open up your Arduino IDE and install the DHTesp Library. There will be two DHT libraries, but we want the one that has ESP8266 in the description. You may also need to add the ESP8266 to your board manager if you have not already, follow the instructions here: https://arduino-esp8266.readthedocs.io/en/latest/installing.html

Now that you have your sensor wired up, and your code in the Arduino IDE. You will need to fill in the settings (WiFi, and ThingSpeak). Sign up on thingspeak and create your channel, then add the API key to your code.

Once you are signed in, click on Channels > My Channels.

Then, you click on “New Channel”

Insert your information (Our code is setup as Temperature in Field 1, Humidity in 2)

Click on API Keys, and copy/paste your Write API key to your Arduino script.

 

When you are doing your upload, please make sure your deep sleep pin is disconnected. To enable the deep sleep mode, you will need to connect D0 to RST pin. It will be GPIO 16 (known as D0 on NodeMCU). You CANNOT upload your script to your ESP8266 with these pins connected, so simply remove for flashing then reconnect once it’s complete.

Now that everything is setup, you can 3D print a case to make it look pretty or just simply leave it how it is and stash it somewhere with a 5V power source. Mine is powered from a USB port on one of my towers, and I mounted it in a case from Thingiverse on the wall away from any of my PC fans. Then monitor your data!

 

Original Code we adapted from: https://github.com/squix78/esp8266-dht-thingspeak-logger

Top