Skip to main content

Linux DNS Setup

The first step is the same for both Static and Dynamic IP address configurations: 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.

1. Open the settings of the current Network Interface.

1.Linux DNS Setup Guide.png
2. Add SafeDNS servers: 195.46.39.39 and 195.46.39.40.

Please note, that servers should be separated by a comma.

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.


Static IP address

Navigate to the SafeDNS Dashboard > Settings and copy your IP address in the "Enter an IP address or DynDNS" box. Click "Add".

3.Linux DNS Setup Guide.png

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

Please note that settings take 5-7 minutes to apply.
Stats and filtering status update every 10 minutes.


Dynamic IP address

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.

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

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

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:

Aug 14 12:49:13 laptop ddclient[4105]: SUCCESS: updating laptop: good: IP address set to 18.26.28.10

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

 

Please note that settings take 5-7 minutes to apply.
Stats and filtering status update every 10 minutes.