# Linux DNS Setup

#### Static IP address

1\. Navigate to the SafeDNS **Dashboard &gt; Settings** and copy your IP address in the "**Enter an IP address or DynDNS**" box. Click "**Add**".

[![1. Linux DNS Setup.png](https://docs.safedns.com/uploads/images/gallery/2024-08/scaled-1680-/qurQz4uZ4kx8NCoe-1-linux-dns-setup.png)](https://docs.safedns.com/uploads/images/gallery/2024-08/qurQz4uZ4kx8NCoe-1-linux-dns-setup.png)

2\. Change your system’s DNS servers to SafeDNS addresses - **195.46.39.39** and **195.46.39.40**

If you configure the network through NetworkManager, it will be sufficient to add SafeDNS servers there.

Open the settings of the current Network Interface.

[![1.Linux DNS Setup Guide.png](https://docs.safedns.com/uploads/images/gallery/2022-08/scaled-1680-/AGQcYoyf5jiLIPFD-1-linux-dns-setup-guide.png)](https://docs.safedns.com/uploads/images/gallery/2022-08/AGQcYoyf5jiLIPFD-1-linux-dns-setup-guide.png)  
Add SafeDNS servers: **195.46.39.39** and **195.46.39.40**.

<p class="callout warning">Please note, that servers must be separated by a comma.  
</p>

[![2.Linux DNS Setup Guide.png](https://docs.safedns.com/uploads/images/gallery/2022-08/scaled-1680-/I4zYcf6G4A6u7hmJ-2-linux-dns-setup-guide.png)](https://docs.safedns.com/uploads/images/gallery/2022-08/I4zYcf6G4A6u7hmJ-2-linux-dns-setup-guide.png)

Otherwise, you need to find out which application is used for the network settings and add SafeDNS servers there.

**Your Linux device is now filtered with the SafeDNS filtering policy.**

<p class="callout warning">Please note that settings take 5-7 minutes to apply.  
Stats and filtering status update every 10 minutes.  
</p>

---

#### Dynamic IP address

1\. Install and configure **ddclient**.

**ddclient** package is shipped with most Linux distributions.

If your Linux distribution doesn’t have ddclient, you can download it from [GitHub](https://github.com/ddclient/ddclient).

After ddclient is installed, you need to insert the next configuration in its config file (/etc/ddclient.conf or /etc/ddclient/ddclient.conf):

<p class="callout info">daemon=300  
syslog=yes  
ssl=yes  
  
protocol=dyndns2  
server=www.safedns.com  
  
use=web  
web=http://www.safedns.com/nic/myip  
  
\# Replace with your email and password for www.safedns.com  
login=you@yourmail.com  
password=your\_password  
  
\# Enter any name for your device.  
\# If you have several computers with dynamic IPs their names must differ.  
laptop</p>

Reboot your device and start ddclient.

If the similar string is shown in the system logs (/var/log/syslog, /var/log/daemon.log or /var/log/messages), ddclient is successfully configured:

<p class="callout info">Aug 14 12:49:13 laptop ddclient\[4105\]: SUCCESS: updating laptop: good: IP address set to 18.26.28.10</p>

2\. Change your system’s DNS servers to SafeDNS addresses - **195.46.39.39** and **195.46.39.40**

If you configure the network through NetworkManager, it will be sufficient to add SafeDNS servers there.

Open the settings of the current Network Interface.

[![1.Linux DNS Setup Guide.png](https://docs.safedns.com/uploads/images/gallery/2022-08/scaled-1680-/AGQcYoyf5jiLIPFD-1-linux-dns-setup-guide.png)](https://docs.safedns.com/uploads/images/gallery/2022-08/AGQcYoyf5jiLIPFD-1-linux-dns-setup-guide.png)  
Add SafeDNS servers: **195.46.39.39** and **195.46.39.40**.

<p class="callout warning">Please note, that servers must be separated by a comma.  
</p>

[![2.Linux DNS Setup Guide.png](https://docs.safedns.com/uploads/images/gallery/2022-08/scaled-1680-/I4zYcf6G4A6u7hmJ-2-linux-dns-setup-guide.png)](https://docs.safedns.com/uploads/images/gallery/2022-08/I4zYcf6G4A6u7hmJ-2-linux-dns-setup-guide.png)

Otherwise, you need to find out which application is used for the network settings and add SafeDNS servers there.

Your Linux device is now filtered with the SafeDNS filtering policy.

<div class="pointer-container" id="bkmrk-%C2%A0"><div class="pointer anim is-page-editable"><svg class="svg-icon" data-icon="link" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg><div class="input-group inline block"> <button class="button outline icon" data-clipboard-target="#pointer-url" title="Copy Link" type="button"><svg class="svg-icon" data-icon="copy" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg></button></div><svg class="svg-icon" data-icon="edit" role="presentation" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"></svg></div></div><p class="callout warning">Please note that settings take 5-7 minutes to apply.  
Stats and filtering status update every 10 minutes.  
</p>