-
Notifications
You must be signed in to change notification settings - Fork 47
Changing Name Servers
The following guides explain how to change DNS Name-Servers on each Operating System in order to point them to SecureDNS Server IP Address.
Note |
---|
The following examples assumes SecureDNS Server is running & listening on 127.0.0.1 |
- Open
Start Menu
. - Type
View Network Connections
then Click on it. - Right-Click
Network Adapter
& ClickProperties
. - Under
Networking
Tab, Double-ClickInternet Protocol Version 4 (TCP/IPv4)
. - Under
General
Tab, SelectUse the following DNS server addresses
. - Type 127.0.0.1 in
Preferred DNS Server
&Alternate DNS Server
.
# Setting DNS Servers
Get-NetAdapter -Physical | ForEach-Object { Set-DnsClientServerAddress $_.Name -ServerAddresses ("127.0.0.1") }
# Resetting DNS Servers
Get-NetAdapter -Physical | ForEach-Object { Set-DnsClientServerAddress $_.Name -ResetServerAddresses }
- Open
System Preferences
. - Select
Network
. - Select
Advanced
. - Select
DNS
. - Remove all existing
Name-Servers
. - Add a single
Name-Server
: 127.0.0.1
> networksetup listallnetworkservices
# From listallnetworkservices output, choose Adapter Name for next command
> networksetup -setdnsservers [Adapter Name] 127.0.0.1
echo 'nameserver 127.0.0.1' | sudo tee /etc/resolv.conf > /dev/null
Note |
---|
On Linux, there are a few services which may try to automatically overwrite your resolv.conf , For Example: resolvconf , dhcpcd & NetworkManager . |
If you're using resolvconf, /etc/resolvconf.conf
must be modified:
$ sudo vi /etc/resolvconf.conf
The name_servers
field must be altered in order to truly alter your
resolv.conf:
name_servers="127.0.0.1"
dhcpcd may try to overwrite your resolv.conf with whatever nameservers are
advertised by your router (usually your ISP's Name-Servers). To prevent this,
/etc/dhcpcd.conf
must be modified:
$ sudo vi /etc/dhcpcd.conf
In the default config, you may see a line which looks like:
option domain_name_servers, domain_name, domain_search, host_name
We want to remove domain_name_servers
, domain_name
, and domain_search
.
option host_name
Likewise, NetworkManager has similar behavior to dhcpcd. To prevent it from
tainting your resolv.conf, /etc/NetworkManager/NetworkManager.conf
must be
altered:
$ sudo vi /etc/NetworkManager/NetworkManager.conf
The default NetworkManager.conf
is usually empty, but we need to add a dns
option under the [main]
section, resulting in a configuration like:
[main]
dns=none
Texnomic SecureDNS © 2020