This code snippet assumes your raspberry pi’s IP address is 192.168.88.3, change the code below to the IP address of your PiHole instances’ address and replace 192.168.88.0/24 with your LAN subnet. Tip: You can also connect to winbox through the windows command prompt, for example (with no password): winbox.exe 192.168.88.1 admin "" Step 2: Redirect DNS traffic that is neither to nor from the PiHole, to the PiHole You can also enter the port number after the IP address, separating them with a colon, like this 192.168.88.1:9999.
To connect to the router, enter the IP or MAC address of the router, specify your username and password (if any) and click on the Connect button. Winbox can be downloaded from the mikrotik download page
If you are not familiar with Winbox, it’s a small utility that allows administration of the MikroTik RouterOS using a fast and simple GUI. Redirect all DNS traffic to PiHole with a MikroTik router Step 1: Connect to the Mikrotik router using WinboxĬonnect to your MikroTik router using Winbox. We want to access geo-blocked content like Netflix and BBC iPlayer on some devices like the Playstation 4 and 5 and the Google Chromecast who uses their own hardcoded DNS servers to determine their location no matter what you specify via DHCP or manually on the device itself. Why are we going to redirect DNS traffic to a Local Server and force users to use our specified DNS server? This is especially great for business networks where you don’t want guests using their own DNS servers to bypass your content blocking.
This approach is only useful if you have a Mikrotik router and semi-useful if your router uses ipchains as the logic is the same and the syntax is not that different. Using a Mikrotik router you can route all DNS traffic to your raspberry PI on which you are running Pi-Hole using SmartDNS as the upstream DNS server.īy adding the firewall rules below we are telling the router to send everyone to the PiHole. Redirect all port 53 (DNS traffic) to Pi-hole for SmartDNS Navigate into it.Ĭreate a new file, ssh (without any file extension).Ĭreate a new file wpa_nf and type in the following lines to it.Force All DNS Traffic To Go Through Pi-hole Using Mikrotik Now, you should see a boot drive on your computer. Select your SD card from the list and click on Continue.Įtcher should start flashing the SD card.Īt this point, the SD card should be flashed. Insert your microSD card into your microSD card reader and plug it in your computer. Select your Raspbian Buster Lite image that you’ve just downloaded and click on Open.
To install Etcher on Linux, check the article Install Etcher on Linux. You can download Etcher, visit the official website of balena Etcher. Once the download is complete, you can use balena Etcher or other image writing programs for Raspberry pi to write the Raspbian Buster Lite image to the microSD card. Your browser should start downloading the Raspbian Buster Lite image.
In order to configure your Raspberry Pi as a wired router, you need the following things:Ģ) A Raspberry Pi power adapter or a 2.1A USB power bankģ) A SD card reader for flashing Raspbian OS onto the microSD card.ħ) A Wi-Fi network to connect the Raspberry Pi toĨ) A computer/laptop for configuring the Raspberry Piįirst, visit the official download page of Raspbian and click on the Download ZIP button of Raspbian Buster Lite image.
In this article, I am going to show you how to configure Raspberry Pi as a wired router. This way, you can use your Raspberry Pi as a wireless router. Or, you can connect to a network which has internet connectivity via the wired network interface, create a Wi-Fi hotspot using the Wi-Fi network interface of the Raspberry Pi and router the internet traffic to the Wi-Fi network interface. This way, you can use your Raspberry Pi as a wired router.
You can connect your Raspberry Pi to a wireless Wi-Fi network which has internet connectivity and route the internet traffic to the wired network interface. You can configure Raspberry Pi as a wireless router or a wired router. Raspberry Pi has a Wi-Fi network interface and a wired network interface. You can configure your Raspberry Pi single board computer into a router.