How to Install Damselfly on Fedora CoreOS Latest
In this tutorial, we will guide you on how to install Damselfly on Fedora CoreOS Latest. Damselfly is a self-hosted, Go-based server that provides a private, encrypted DNS server that blocks ads and malware.
Prerequisites
Before starting the installation process, you will need to have the following:
- A running Fedora CoreOS Latest instance with root access
- A domain name to use for your Damselfly server
Step 1: Download the Damselfly Binary
First, we need to download the Damselfly binary from the official website. You can download it from https://damselfly.info/downloads.
wget https://damselfly.info/downloads/damselfly
Step 2: Create a Systemd Service Unit File
Next, we will create a Systemd service unit file to run Damselfly as a service. We will create the file at "/etc/systemd/system/damselfly.service".
sudo nano /etc/systemd/system/damselfly.service
Then, copy and paste the following configuration:
[Unit]
Description=Damselfly DNS Server
[Service]
Type=simple
ExecStart=/path/to/damselfly -u damselfly -g damselfly -c /etc/damselfly/damselfly.toml
Restart=always
[Install]
WantedBy=multi-user.target
Replace "/path/to/damselfly" with the actual path to the Damselfly binary file that you downloaded earlier.
Save the file and exit the editor by pressing "Ctrl + X", followed by "Y" and then "Enter".
Step 3: Create a Configuration File
Now, we need to create a configuration file for Damselfly. We will create the file at "/etc/damselfly/damselfly.toml".
sudo mkdir /etc/damselfly
sudo nano /etc/damselfly/damselfly.toml
Then, copy and paste the following configuration:
[Web]
Domain = "example.com"
Listen = "127.0.0.1:53"
[Upstream]
DNS = ["1.1.1.1", "1.0.0.1"]
[Blocking]
Hosts = "/etc/damselfly/hosts.txt"
Malware = "/etc/damselfly/malware.txt"
[Logging]
File = "/var/log/damselfly.log"
Replace "example.com" with your domain name that you want to use for your Damselfly server.
Save the file and exit the editor by pressing "Ctrl + X", followed by "Y" and then "Enter".
Step 4: Create Hosts and Malware Blocklist Files
We need to create two files that Damselfly will use to block hosts and malware. For example, we will create the files at "/etc/damselfly/hosts.txt" and "/etc/damselfly/malware.txt".
sudo nano /etc/damselfly/hosts.txt
Then, add the list of hosts that you want to block, one per line.
Save the file and exit the editor by pressing "Ctrl + X", followed by "Y" and then "Enter".
Similarly, create a file for Malware list:
sudo nano /etc/damselfly/malware.txt
Then, add the list of malware that you want to block, one per line.
Save the file and exit the editor by pressing "Ctrl + X", followed by "Y" and then "Enter".
Step 5: Start and Enable Damselfly Service
Now, start the Damselfly service and enable it to start automatically at boot.
sudo systemctl start damselfly.service
sudo systemctl enable damselfly.service
Step 6: Verify Damselfly
You can verify that Damselfly is working properly by checking the logs:
sudo tail -f /var/log/damselfly.log
You can also configure your DNS client (such as your web browser) to use your Damselfly server.
Conclusion
Congratulations! You have successfully installed Damselfly on Fedora CoreOS Latest. Damselfly is now blocking ads and malware for your entire network.