In this tutorial, we will show you how to install Pi-hole on Fedora 38. Network management and security have become paramount in our digital age. Unwanted ads, tracking, and malware can significantly impact your online experience and pose a security risk. Pi-hole is a powerful, open-source solution that acts as a DNS sinkhole, blocking unwanted content before it even reaches your devices.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Pi-hole on a Fedora 38.
- A server running one of the following operating systems: Fedora 38.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Pi-hole.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Pi-hole on Fedora 38
Step 1. Before we can install Pi-hole on Fedora 38, it’s important to ensure that our system is up-to-date with the latest packages. This will ensure that we have access to the latest features and bug fixes and that we can install Pi-hole without any issues:
sudo dnf update
Step 2. Installing Required Dependencies.
Pi-hole relies on several packages and libraries to function correctly. You can install these dependencies using the
dnf package manager:
sudo dnf install curl lsof net-tools
Step 3. Set a Static IP Address.
Setting a static IP address ensures that Pi-hole’s DNS server remains accessible. Follow these steps to configure a static IP using Network Manager. First, check your current network configuration to gather information:
Note down your current IP address, gateway, and DNS settings.
Open the Network Manager configuration file for editing:
sudo nano /etc/sysconfig/network-scripts/ifcfg-<YOUR_INTERFACE_NAME>
<YOUR_INTERFACE_NAME> with the name of your network interface.
Modify the file to configure a static IP address. Here is an example of what to include in the file:
BOOTPROTO=static IPADDR=192.168.1.10 # Your desired static IP address NETMASK=255.255.255.0 GATEWAY=192.168.1.1 # Your gateway IP address DNS1=192.168.1.1 # Your DNS server (usually your gateway)
Save the file then, restart the network service to apply the changes:
sudo systemctl restart NetworkManager
Step 4. Disable SELinux and Firewall.
SELinux and firewalls can interfere with Pi-hole’s operation. While we recommend leaving SELinux enabled for security, you can temporarily disable it for Pi-hole installation. Be cautious when disabling SELinux and always re-enable it when the installation is complete:
To temporarily disable SELinux, use the following command:
sudo setenforce 0
You can re-enable SELinux later by running:
sudo setenforce 1
Step 5. Installing Pi-hole on Fedora 38.
Now that your system is prepared, it’s time to download Pi-hole. We will retrieve the installer script from the official repository:
curl -sSL https://install.pi-hole.net | sudo bash
You will be presented with the Pi-hole installer wizard. Follow the on-screen instructions to configure Pi-hole as per your preferences.
During the installation process, you will encounter several configuration options. Here’s a closer look at some of the choices you’ll need to make:
- Choose an Interface
Pi-hole will ask you to select the network interface you want to use for DNS. The installer will typically pre-select the correct interface. If not, choose the one connected to your local network and press Enter.
- Select an Upstream DNS Provider
You’ll need to choose an upstream DNS provider. We recommend using a reliable, privacy-focused DNS provider, such as Cloudflare (184.108.40.206) or Google (220.127.116.11). You can also use your ISP’s DNS servers.
- Enable Query Logging
Query logging records all DNS queries made through Pi-hole. It can be useful for monitoring network activity. Decide if you want to enable this feature.
Pi-hole uses blocklists to filter out unwanted content. The default blocklists are effective, but you can add custom ones or remove entries as needed. Pi-hole maintains an extensive list of available blocklists on their website.
- Web Interface Password
Set a password for the Pi-hole web interface. This password is used to access Pi-hole’s admin panel.
- Fallback DNS Server
Choose a fallback DNS server. This server is used if Pi-hole encounters an issue and needs to forward DNS requests. You can use your ISP’s DNS server or choose one of the upstream DNS providers.
Follow the installer’s prompts and configure Pi-hole according to your preferences. Once the installation is complete, you’ll receive a summary of your settings.
Step 6. Accessing Pi-Hole Web Interface.
In the address bar, enter the IP address of your Fedora system, which is now running Pi-hole. By default, Pi-hole uses port 80. For example, if your Fedora system’s IP address is
You’ll be prompted to enter your Pi-hole admin console password that you set during the installation.