VideosMy ProjectsProgramming BlogGallery
  1. Home
  2. Blog
  3. Change the DNS in Linux
Programming Blog

Atom/RSS Feed

linux

Change the DNS in Linux

linux

Changing the DNS in linux is pretty useful to get past any censorship your isp has imposed on you. For example thepiratebay.org, 4chan.org

Edit the resolv.conf (the DNS config file)

sudo vim /etc/resolv.conf

Change IP Address of existing nameserver

The Google DNS IP is

8.8.8.8 primary

8.8.4.4 secondary

Change the IP address of the nameserver to these values and save the file

Default resolv.conf (incase you mess up)

#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.xx
Join my mailing list