Showing posts with label DNS. Show all posts
Showing posts with label DNS. Show all posts

Saturday, 13 June 2015

Kubuntu DNS settings

Seem like DNS settings are no longer stored in resolv.conf but this can still be extracted from the netwok Manager CLI.


nmcli dev show [device] e.g. nmcli dev show wlan0


This will return information including:

IP4.DNS[1]:
IP4.DOMAIN[1]:

Therefore a quick awk can return the value needed:


nmcli dev show wlan0 | grep IP4.DNS | awk -F: '{ print $2 }' | awk '{ print $1 }'



Thursday, 14 January 2010

Bind Dynamic DNS Updates

I saw a request to update Bind via a command line rather than Webmin for the ease and speed of a command line; So I embarked on investigating this.

Firstly it seems that there is not a lot of dynamic update or command line update scripts available or the people just don't want to share ???

I stumbled across nsupdate, an application that is part of the Bind suite.
This is a command line tool to add dynamic updates to an DNS server.

for this to work you need to update the specific zone file with at least the following configuration:

zone "example.com" {
type master;
file "/etc/bind/example.com.hosts";
allow-update {192.168.0.0/24; };
journal "/var/lib/bind/example.com.hosts.jnl";

};
For dynamic DNS you need:
allow-update
journal

then to add an entry to the DNS server:
from within the 192.168 ip range :

user@pc:~$ nsupdate
> zone example.com
> update add guest1.example.com. 86400 A 192.168.0.10
> send
> quit

your syslog on your DNS server will log all updates

Wednesday, 9 December 2009

Can't ping FQDN in Ubuntu

I created a local DNS zone ending in .local and experienced weird DNS behaviour; dig worked 100%

It seems the avahi-daemon interferes with the normal resolving process. It’s DNS caching borks the normal functionality

The fix:


# shut it down
sudo /etc/init.d/avahi-daemon stop
# stop it starting at the next reboot by removing the startup links
sudo update-rc.d -f avahi-daemon remove
Removing any system startup links for /etc/init.d/avahi-daemon ...
/etc/rc1.d/K86avahi-daemon
/etc/rc2.d/S50avahi-daemon
/etc/rc3.d/S50avahi-daemon
/etc/rc4.d/S50avahi-daemon
/etc/rc5.d/S50avahi-daemon