How to Install Blocky on Arch Linux
Blocky is an open-source DNS server that secures and protects your network by blocking unwanted domains, allowing you to control your internet usage. In this tutorial, we will cover how to install Blocky on Arch Linux.
Prerequisites
- A system running Arch Linux
- Basic knowledge of Linux commands
Install dependencies
Before installing Blocky, some dependencies need to be installed. Open the terminal and run the following command to update your system's package list.
$ sudo pacman -Syy
Once the packages list is updated, run the following command to install the dependencies.
$ sudo pacman -S go git libcap
Install Blocky
To install Blocky, follow the steps below:
- Clone the Blocky repository from Github using Git.
$ git clone https://github.com/0xERR0R/blocky.git
- Change the directory to the downloaded Blocky files.
$ cd blocky
- Build the Blocky executable file.
$ go build
- (Optional) Set the capabilities for the binary file.
$ sudo setcap 'cap_net_bind_service=+ep' ./blocky
Configure Blocky
Before running Blocky, a configuration file needs to be created. Follow the steps below to create the configuration file.
- Copy the example configuration file.
$ cp blocky.yml.example blocky.yml
- Open the "blocky.yml" configuration file using a text editor of your choice.
$ nano blocky.yml
- Edit the configuration file by setting the values of the parameters to your preferences. Some important parameters are:
- upstream_dns_servers: The DNS servers that Blocky will use to resolve queries that could not be resolved locally.
- blocked_hosts: The list of domains that you wish to block on your network.
- listen_on: The IP address and port that Blocky will listen on.
- Save the configuration file and exit the text editor.
Run Blocky
To run Blocky, execute the following command:
$ sudo ./blocky
Blocky will start and listen on the port specified in the configuration file.
Conclusion
Blocky is now installed and running on your Arch Linux system. You can now use it to block unwanted domains, secure and control your network usage. Congratulations!