DNSCrypt-Proxy FreeBSD


 

Using DNS Proxy to block sites and change DNS provider.

 

Installation on FreeBSD


 

pkg install dnscrypt-proxy2


 

Confirm the installation and wait until it completes. Then get set up, the configuration file can be found at the following path:


 

/usr/local/etc/dnscrypt-proxy/dnscrypt-proxy.toml


 

Open it with any editor, depending on your preference.

So, to block sites that you consider malicious or otherwise intolerant or disgusting to your family or its members, create the following file.


 

blacklist.txt.


 

Where you put the undesirable sites, each on a new line. Here is an example of blocking Yandex and Vkontakte.


 

*yandex*

*vk.com


 

Then in the file dnscrypt-proxy.toml you add bullets to the block list, i.e:


 

[blacklist]


 

blacklist_file = '/usr/local/etc/dnscrypt-proxy/blacklist.txt


 

After that, access to Yandex and Vkontakte will be blocked on your device, as well as other sites.


 


 

Also, you can add a white list of sites, the only difference is the name of the file with a white list and adding a string in dnscrypt-proxy.toml. It looks like this:


 


 

[whitelist]


 

whitelist_file = '/usr/local/etc/dnscrypt-proxy/whitelist.txt'.


 


 


 

To use third party DNS instead of your ISP's DNS the following line should be in your configuration file:


 

server_names = ['google']


 


 

This example shows that Google's public DNS servers will be used instead of your provider DNS.


 


 

In GNU/Linux dnscrypt-proxy is configured the same way, the only difference is the location of configuration files and how to install dnscrypt-proxy depending on the GNU/Linux distribution.