mirror of
https://codeberg.org/postscriptum/gemlog.git
synced 2026-02-19 22:42:39 +00:00
61 lines
1.2 KiB
Text
61 lines
1.2 KiB
Text
# Install Alfis DNS on Linux
|
|
|
|
* git clone https://github.com/Revertron/Alfis.git && cd Alfis
|
|
* cargo build --release
|
|
* sudo cp target/release/alfis /usr/bin/alfis
|
|
* sudo chmod 0700 /usr/bin/alfis
|
|
* sudo useradd alfis
|
|
* sudo chown alfis:alfis /usr/bin/alfis
|
|
* sudo mkdir /var/lib/alfis
|
|
* sudo chown alfis:alfis /var/lib/alfis
|
|
|
|
## Config
|
|
|
|
* sudo cp alfis.conf /etc/alfis.conf
|
|
|
|
``` /etc/alfis.conf
|
|
listen = "127.0.0.1:53"
|
|
```
|
|
|
|
## Service
|
|
|
|
* sudo nano /etc/systemd/system/alfis.service
|
|
|
|
``` alfis.service
|
|
[Unit]
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
User=alfis
|
|
Group=alfis
|
|
|
|
ProtectHome=true
|
|
ProtectSystem=true
|
|
|
|
SecureBits=keep-caps
|
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
|
|
SyslogIdentifier=alfis
|
|
WorkingDirectory=/var/lib/alfis
|
|
ExecStart=/usr/bin/alfis -n -c /etc/alfis.conf
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
Restart=always
|
|
TimeoutStopSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
```
|
|
|
|
* sudo systemctl daemon-reload
|
|
* sudo systemctl enable alfis
|
|
* sudo systemctl start alfis
|
|
|
|
## GNOME Network Manager
|
|
|
|
* Select active connection
|
|
* In IPv4 tab change DNS to 127.0.0.1
|
|
* In IPv6 tab change DNS to ::1
|
|
* Disable automatic mode (on enabled)
|
|
* Save changes
|