Changing the domain name server (DNS) is one of the easiest way. If the contents restriction is by DNS we simply only need to use another DNS, if not then this method cannot be use. Changing DNS on client is also among the most basic because there are many open DNS server out there compared to proxy and VPN server. Many users used Google’s DNS server “” to bypass censorship or sometimes, it is just faster. Another reason is, if your censorship only comes from DNS, it is much easier to change your DNS setting the performing overkills such as setting proxy and VPN, and in some cases, even you do set proxy and VPN, sometimes it just doesn’t work if the censorship comes from the DNS.

Here DNS will be introduced on public level in other words simple term. More information can be found in my article Simple Introduction to Computer Network and technical term will be upcoming. To make things short we browse the web mainly using the domain address for example “www.facebook.com”, but our machine itself prefer internet protocol (IP) address which is still version 4 of IP “”. When we write, the DNS translate it from “www.facebook.com” > “”.

Setting DNS Windows

If you want to change from command line, then type the following on cmd.exe:

Setting DNS Android

Setting DNS Linux

If you want to do it from terminal, then be administrator using “sudo su”, edit “/etc/resolve.conf” file using nano, vim, etc, and set for example “nameserver”.

Building DNS Server Linux

Here I will only demonstrate locally using bind9. If you want to put on public domain, just change to public IP addresses.

Edit “/etc/bind/named.conf.options” if you want to add forwarders such as:

Create a zone in any conf file, in the video above, I added a zone in “/etc/bind/named.conf.local” since it’s only for local network. For example:

In above code, the zone name is “example.com” and the type is “master”. The zone file is specified to “/etc/bind/db.example.com” but you can change the name and directory of the file as you wished but for now in “/etc/bind/db.example.com”:

We defined “example.com” as “”, we also define a subdomain “ns.example.com” the same as “example.com”. Note, there are example zone files such as “/etc/bind/db.local” if you need a skeleton, else go to bind9 official website for further technical details. Next is creating a reverse zone file to resolve names to IP Address. Edit “/etc/bind/named.conf.local” once again and add for example:

Replace “1.168.192” with the network you are using if you are using a different one. The reverse zone file in above video is “/etc/bind/db.192”. If you need a skeleton, there is “/etc/bind/db.127”. The contents below shows that “ns.example.com” is “”:

Finally, “sudo systemctl restart bind9.service” to restart the DNS server.


this blog contains all my articles licensed under creative commons attribution customized sharealike (cc-by-sa) where you can sell but mention the open one here

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store