Restrict|Limit DNS Nameservers

0

I'm running local DNS (BIND9 on primary and secondary Ubuntu servers). On my Ubuntu desktop, however, I've noticed that while it usually seems to be resolving addresses properly with the local DNS servers, it actually lists four DNS nameservers. The first two are my local DNS (RPi) machines, but third and fourth are my ISP's nameservers:

nmcli dev show | grep DNS
IP4.DNS[1]:                             192.168.0.2
IP4.DNS[2]:                             192.168.0.3
IP4.DNS[3]:                             75.75.75.75
IP4.DNS[4]:                             75.75.76.76

The /etc/network/interfaces on the local DNS looks like this:

# primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 192.168.0.2
        netmask 255.255.255.0
        gateway 192.168.0.1
        broadcast 192.168.0.255
dns-search home.lan
dns-domain home.lan
dns-nameservers 192.168.0.2 192.168.0.3 192.168.0.2 192.168.0.3

I'd like to restrict all connected members of the network to only the two local DNS nameservers. Any advice or suggestions is greatly appreciated!

nmax

Posted 2016-06-04T14:32:24.287

Reputation: 321

Answers

0

Q. I'd like to restrict all connected members of the network to only the two local DNS nameservers.

A. Dhcp "addresses only" in the GUI, or "supersede" on the command line.


In the graphical interface:

  • Choose the IPv4 Settings tab
  • Select "Automatic (DHCP) addresses only" in the method drop down.

Or else you can do it with the command line: ( courtesy of Raam Dev raamdev.com )

supersede domain-name-servers 192.168.0.2, 192.168.0.3;

BloodyEl

Posted 2016-06-04T14:32:24.287

Reputation: 598