Whispers & Screams
And Other Things

Carpe Diem (Catullus 5)

Let us live and love
And not care tuppence for them,
Who sermonise and disapprove.
Suns when they sink can rise again,
But we, when our brief light has shone,
Must sleep the long night on and on.

Continue reading
2054 Hits
0 Comments

Philip Larkin - Church Going

Once I am sure there's nothing going on
I step inside, letting the door thud shut.
Another church: matting, seats, and stone,
And little books; sprawlings of flowers, cut
For Sunday, brownish now; some brass and stuff
Up at the holy end; the small neat organ;
And a tense, musty, unignorable silence,
Brewed God knows how long. Hatless, I take off
My cycle-clips in awkward reverence.

Move forward, run my hand around the font.
From where I stand, the roof looks almost new -
Cleaned, or restored? Someone would know: I don't.
Mounting the lectern, I peruse a few
Hectoring large-scale verses, and pronounce
'Here endeth' much more loudly than I'd meant.
The echoes snigger briefly. Back at the door
I sign the book, donate an Irish sixpence,
Reflect the place was not worth stopping for.

Yet stop I did: in fact I often do,
And always end much at a loss like this,
Wondering what to look for; wondering, too,
When churches will fall completely out of use
What we shall turn them into, if we shall keep
A few cathedrals chronically on show,
Their parchment, plate and pyx in locked cases,
And let the rest rent-free to rain and sheep.
Shall we avoid them as unlucky places?

Or, after dark, will dubious women come
To make their children touch a particular stone;
Pick simples for a cancer; or on some
Advised night see walking a dead one?
Power of some sort will go on
In games, in riddles, seemingly at random;
But superstition, like belief, must die,
And what remains when disbelief has gone?
Grass, weedy pavement, brambles, buttress, sky,

A shape less recognisable each week,
A purpose more obscure. I wonder who
Will be the last, the very last, to seek
This place for what it was; one of the crew
That tap and jot and know what rood-lofts were?
Some ruin-bibber, randy for antique,
Or Christmas-addict, counting on a whiff
Of gown-and-bands and organ-pipes and myrrh?
Or will he be my representative,

Bored, uninformed, knowing the ghostly silt
Dispersed, yet tending to this cross of ground
Through suburb scrub because it held unspilt
So long and equably what since is found
Only in separation - marriage, and birth,
And death, and thoughts of these - for which was built
This special shell? For, though I've no idea
What this accoutred frowsty barn is worth,
It pleases me to stand in silence here;

A serious house on serious earth it is,
In whose blent air all our compulsions meet,
Are recognized, and robed as destinies.
And that much never can be obsolete,
Since someone will forever be surprising
A hunger in himself to be more serious,
And gravitating with it to this ground,
Which, he once heard, was proper to grow wise in,
If only that so many dead lie round.

Continue reading
2798 Hits
1 Comment

The Inchcape Rock



NO stir in the air, no stir in the sea,

The ship was still as she could be;

Her sails from heaven received no motion;

Her keel was steady in the ocean.

 

Without either sign or sound of their shock,

The waves flowed over the Inchcape Rock;

So little they rose, so little they fell,

They did not move the Inchcape Bell.

 

The Abbot of Aberbrothok

Had placed that bell on the Inchcape Rock;

On a buoy in the storm it floated and swung,

And over the waves its warning rung.

 

When the rock was hid by the surge’s swell,

The mariners heard the warning bell;

And then they knew the perilous rock,

And blest the Abbot of Aberbrothok.

 

The sun in heaven was shining gay;

All things were joyful on that day;

The sea-birds screamed as they wheeled round,

And there was joyance in their sound.

 

The buoy of the Inchcape Bell was seen,

A darker speck on the ocean green:

Sir Ralph the Rover walked his deck,

And he fixed his eye on the darker speck.

 

He felt the cheering power of spring;

It made him whistle, it made him sing:

His heart was mirthful to excess,

But the Rover’s mirth was wickedness.

 

His eye was on the Inchcape float;

Quoth he, “My men, put out the boat,

And row me to the Inchcape Rock,

And I ’ll plague the Abbot of Aberbrothok.”

 

The boat is lowered, the boatmen row,

And to the Inchcape Rock they go;

Sir Ralph bent over from the boat,

And he cut the bell from the Inchcape float.

 

Down sunk the bell with a gurgling sound;

The bubbles rose and burst around:

Quoth Sir Ralph, “The next who comes to the rock

Won’t bless the Abbot of Aberbrothok.”

 

Sir Ralph the Rover sailed away;

He scoured the seas for many a day;

And now, grown rich with plundered store,

He steers his course for Scotland’s shore.

 

So thick a haze o’erspreads the sky,

They cannot see the sun on high:

The wind hath blown a gale all day;

At evening it hath died away.

 

On the deck the Rover takes his stand;

So dark it is, they see no land.

Quoth Sir Ralph, “It will be lighter soon,

For there is the dawn of the rising moon.”

 

“Canst hear,” said one, “the breakers roar?

For methinks we should be near the shore.”

“Now where we are I cannot tell,

But I wish I could hear the Inchcape Bell.”

 

They hear no sound; the swell is strong;

Though the wind hath fallen, they drift along,

Till the vessel strikes with a shivering shock:

“O Christ! it is the Inchcape Rock!”

 

Sir Ralph the Rover tore his hair,

He curst himself in his despair:

The waves rush in on every side;

The ship is sinking beneath the tide.

 

But even in his dying fear

One dreadful sound could the Rover hear,—

A sound as if, with the Inchcape Bell,

The Devil below was ringing his knell.

Continue reading
2377 Hits
0 Comments

Decisions Decisions

Making decisions in life is hard. Its a worry. Its a moment in time where all the comforting possibilities are whittled right down to just a few. Its tempting to think of those as limited to success or failure. Maybe even partial success but its more complicated than that.screen-shot-2014-07-28-at-10-38-59-am-e1406558423571

Ive taken the decision to start businesses, leave businesses, go back to University and even more significant and terrifying decisions in my personal life. To be fair, I think Ive done a good job so far. So far so good.

But how do you know if a decision is the right one? Is there a way to be sure that whatever you pick is the best choice? That it will surpass anything and everything that might have been?

Sorry but Nope.

You can’t know. You’ll never know for sure. You can't examine all of your possible futures and thats just tough.

But, you do know one thing and thats the thing that really matters. No matter how things play out, you will gain from the experience.

That something could be financial, educational, or it could just be a lesson learned. Perhaps a particularly tough one. Its irrelevant, because what you can say for sure is that the results you end up with will never amount to zero.

That decision could end up being just another decision you made in a long string of them. It could also be huge. But the point is you can’t try to quantify it before it has played out. Don’t try to put all the weight of the world in the decision.

A decision is just a single moment in your career. In the scheme of things it really doesn’t matter as long as you’re moving forward. Stop worrying about the things that don’t matter! Trying to figure out whether this is the moment that you “made it” will keep you from moving forward. And it will make it much harder to decide between everything you have going on. Which option will get me my “moment”? Why will it get me “there”?

What’s important is that you decided to do anything at all in the first place.

And what’s likely is that whatever “moment” you’re looking for hasn’t happened yet.

Spend all your time in the in-between space, the time between starting and stopping.

And remember that whatever decision you make, it will get you somewhere.

So go on. Jump. What's the worst that can happen?

Decisions aren’t ever right or wrong.

Your career hasn’t made it or not made it.

The magic is in the jump.

Continue reading
2010 Hits
0 Comments

Set up BIND as a DNS Server on Ubuntu

Introduction

 



DNS is important. The Domain Name Service is perhaps the most overlooked component of routine Internet services. When it becomes compromised or fails, the consequences can be far reaching and even catastrophic. To control DNS is to potentially control everything since modifying DNS services can redirect any user anywhere. It doesnt take a rocket scientist to understand the dramatic consequences of redirecting paypal.com to hackedpaypal.com and have all users innocently punching in their login details for collection in a nasty database somewhere.

DNS is also convenient. Setting your browser to use the bbc.co.uk website wouldnt be quite so easy if you had to refer to it as 212.58.246.104. Using fully qualified domain names (FQDNs), instead of IP addresses, to specify network addresses eases the configuration of services and applications, and increases the maintainability of configuration files.

As I am currently setting up some of my own internal nameservers, I decide to create a guide for my blog. In this post, I will go over how to set up an internal DNS server, using the BIND name server software (BIND9), that can be used by your own private network in the home or business to resolve host names and IP addresses. This provides a central way to manage your own hostnames and IP addresses, which is indispensable when your environment expands to more than a few hosts.

DNS Hosts


We will be setting up the new DNS servers in our office in London serving the technofatty domain. With this assumption, we decide that it makes sense to use a naming scheme that uses "ldn1.technofatty.com" to refer to our private subnet or zone. Therefore, host1's private Fully-Qualified Domain Name (FQDN) will be "pc1.ldn1.technofatty.com". Refer to the following table the relevant details:
Host Role Private FQDN Private IP Address
host1 User PC 1 pc1.ldn1.technofatty.com 192.168.1.101
host2 DVR 1 dvr1.ldn1.technofatty.com 192.168.1.102

Note: Your own setup will be different, but the example names and IP addresses given will be used to demonstrate how to configure a DNS server to provide a functioning internal DNS. You should be able to adapt this setup to your own environment fairly simply by replacing the host names and private IP addresses with your own. It is not necessary to use the region name of the site in your naming scheme, but we use it here to denote that these hosts belong to a particular sites private network. If you have multiple sites, you can set up an internal DNS within each respective site.
 

Our Goal


By the end of this tutorial, we will have a primary DNS server, ns1, as well as a secondary DNS server,ns2, which will operate as a backup.

Here is a table with example names and IP addresses:
Host Role Private FQDN Private IP Address
ns1 Pri DNS Server ns1.ldn1.technofatty.com 192.168.1.1
ns2 Sec DNS Server ns2.ldn1.technofatty.com 192.168.1.2

Let's get started by installing our Primary DNS server, ns1.
 

Install BIND on Primary Server


On both DNS servers, ns1 and ns2, carry out apt-get update
sudo apt-get update

Next install BIND:
sudo apt-get install bind9 bind9utils bind9-doc

IPv4 Mode


Next we need to set BIND to IPv4 mode. On both servers, edit the bind9 startup options file:
sudo nano /etc/default/bind9

Add "-4" to the OPTIONS variable. It should look like the following:
OPTIONS="-4 -u bind"

Save and exit.

OK onwards to configure the primary DNS server.
 

Configure Primary DNS Server


BIND's configuration consists of multiple files, which are included from the main configuration file, named.conf. These filenames begin with "named" because that is the name of the process that BIND runs. We will start with configuring the options file. The default contents of this file are shown below:

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

Configure Options File


As you can see from the above, the first file that is included is named.conf.options. On ns1, open the named.conf.options file for editing:
sudo nano /etc/bind/named.conf.options

Above the existing options block, create a new ACL block called "trusted". This is where we will define list of clients that we will allow recursive DNS queries from (i.e. your servers that are in the same datacenter as ns1). Using our example private IP addresses, we will add ns1, ns2, host1, and host2 to our list of trusted clients:
acl "trusted" {
192.168.1.1; # ns1 - can be set to localhost
192.168.1.2; # ns2
192.168.1.101; # pc1
192.168.2.102; # dvr1
};

Having set up the list of trusted DNS clients, we now need to edit the options block. Currently, the start of the block looks like the following:
options {
directory "/var/cache/bind";
...
}

Below the directory directive, add the highlighted configuration lines (and substitute in the proper ns1 IP address) so it looks something like this:
options {
directory "/var/cache/bind";

recursion yes; # enables resursive queries
allow-recursion { trusted; }; # allows recursive queries from "trusted" clients
listen-on { 192.168.1.1; }; # ns1 private IP address - listen on private network only
allow-transfer { none; }; # disable zone transfers by default

forwarders {
8.8.8.8;
8.8.4.4;
};
...
};

Now save and exit named.conf.options. The above configuration specifies that only your own servers (the "trusted" ones) will be able to query your DNS server.

Next, we will configure the local file, to specify our DNS zones.

Configure Local File


On ns1, open the named.conf.local file using nano:
sudo nano /etc/bind/named.conf.local

Apart from some commented lines, the default file will be empty. This is where, we specify our forward and reverse zones.

Add the forward zone with the following lines (substituting the zone name as appropriate):
zone "ldn1.technofatty.com" {
type master;
file "/etc/bind/zones/db.ldn1.technofatty.com"; # zone file path
allow-transfer { 192.168.1.2; }; # ns2 address - secondary
};

Assuming that our private subnet is 192.168.1.0/24, add the reverse zone by with the following lines (note that our reverse zone name starts with "168.192" which is the octet reversal of "192.168"):
zone "168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.168.192"; # 192.168.1.0/24 subnet
allow-transfer { 192.168.1.2; }; # ns2 address - secondary
};

If your servers span more than one subnet but are on the same site, dont forget to specify an additional zone and zone file for each seperate subnet.

Once finished adding all of your required zones, save and exit the named.conf.local file.

Now that our zones are specified in BIND, we need to create the corresponding forward and reverse zone files.

Create Forward Zone File


The forward zone file is where we define DNS records for forward DNS lookups. That is, when the DNS receives a name query, "host1.nyc2.example.com" for example, it will look in the forward zone file to resolve host1's corresponding private IP address.

Let's create the directory where our zone files will reside. According to our named.conf.local configuration, that location should be /etc/bind/zones:
sudo mkdir /etc/bind/zones

It is simplest to base our forward zone file on the sample db.local zone file which is installed by default. Copy it to the proper location with the following commands:
cd /etc/bind/zones
sudo cp ../db.local ./db.ldn1.technofatty.com

Now let's edit our forward zone file:
sudo nano /etc/bind/zones/db.ldn1.technofatty.com

Initially, it will look something like the following:
$TTL    604800
@ IN SOA localhost. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost. ; delete this line
@ IN A 127.0.0.1 ; delete this line
@ IN AAAA ::1 ; delete this line

First, you will want to edit the SOA record. Replace the first "localhost" with ns1's FQDN, then replace "root.localhost" with "admin.ldn1.technofatty.com". Also, every time you edit a zone file, you should increment the serial value before you restart the named process--we will increment it to "3". It should look something like this:
@       IN      SOA     ns1.ldn1.technofatty.com. admin.ldn1.technofatty.com. (
3 ; Serial

Now delete the three records at the end of the file (after the SOA record). If you're not sure which lines to delete, they are marked with a "delete this line" comment above.

At the end of the file, add your nameserver records with the following lines (replace the names with your own). Note that the second column specifies that these are "NS" records:
; name servers - NS records
IN NS ns1.ldn1.technofatty.com.
IN NS ns2.ldn1.technofatty.com.

Then add the A records for your hosts that belong in this zone. This includes any server whose name we want to end with ".ldn1.technofatty.com" (substitute the names and private IP addresses). Using our example names and private IP addresses, we will add A records for ns1, ns2, pc1, and dvr1 like so:
; name servers - A records
ns1.ldn1.technofatty.com. IN A 192.168.1.1
ns2.ldn1.technofatty.com. IN A 192.168.1.2

; 192.168.1.0/24 - A records
pc1.ldn1.technofatty.com. IN A 192.168.1.101
dvr1.ldn1.technofatty.com. IN A 192.168.1.102

Save and exit the db.ldn1.technofatty.com file.

Our final example forward zone file looks like the following:
$TTL    604800
@ IN SOA ns1.ldn1.technofatty.com. admin.ldn1.technofatty.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; name servers - NS records
IN NS ns1.ldn1.technofatty.com.
IN NS ns2.ldn1.technofatty.com.

; name servers - A records
ns1.ldn1.technofatty.com. IN A 192.168.1.1
ns2.ldn1.technofatty.com. IN A 192.168.1.2

; 192.168.1.0/24 - A records
pc1.ldn1.technofatty.com. IN A 192.168.1.101
dvr1.ldn1.technofatty.com. IN A 192.168.1.102

Next we move on to the reverse zone file(s).

Create Reverse Zone File(s)


Reverse zone file are where we define DNS PTR (pointer) records for reverse DNS lookups. That is, when the DNS receives a query by IP address, "192.168.1.101" for example, it will look in the reverse zone file(s) to resolve the corresponding FQDN, "pc1.ldn1.technofatty.com" in this case.

On ns1, for each reverse zone specified in the named.conf.local file, create a reverse zone file. We will base our reverse zone file(s) on the sample db.127 zone file. Copy it to the proper location with the following commands (substituting the destination filename so it matches your reverse zone definition):
cd /etc/bind/zones
sudo cp ../db.127 ./
db.168.192

Edit the reverse zone file that corresponds to the reverse zone(s) defined in named.conf.local:
sudo nano /etc/bind/zones/db.168.192

Initially, it will look something like the following:
$TTL    604800
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost. ; delete this line
1.0.0 IN PTR localhost. ; delete this line

In the same manner as the forward zone file, you will want to edit the SOA record and increment the serial value. It should look something like this:
@       IN      SOA     ns1.ldn1.technofatty.com. admin.ldn1.technofatty.com. (
3 ; Serial

Now delete the two records at the end of the file (after the SOA record). If you're not sure which lines to delete, they are marked with a "delete this line" comment above.

At the end of the file, add your nameserver records with the following lines (replace the names with your own). Note that the second column specifies that these are "NS" records:
; name servers - NS records
IN NS ns1.ldn1.technofatty.com.
IN NS ns2.ldn1.technofatty.com.

Then add PTR records for all of your servers whose IP addresses are on the subnet of the zone file that you are editing. In our example, this includes all of our hosts because they are all on the 10.128.0.0/16 subnet. Note that the first column consists of the last two octets of your servers' private IP addresses in reversed order. Be sure to substitute names and private IP addresses to match your servers:
; PTR Records
1.1 IN PTR ns1.ldn1.technofatty.com. ; 192.168.1.1
2.1 IN PTR ns2.ldn1.technofatty.com. ; 192.168.1.2
101.1 IN PTR pc1.ldn1.technofatty.com. ; 192.168.1.101
102.1 IN PTR dvr1.ldn1.technofatty.com. ; 192.168.1.102

Save and exit the reverse zone file (repeat this section if you need to add more reverse zone files).

Our final example reverse zone file looks like the following:
$TTL    604800
@ IN SOA ns1.ldn1.technofatty.com. admin.ldn1.technofatty.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL

; name servers - NS records
IN NS ns1.ldn1.technofatty.com.
IN NS ns2.ldn1.technofatty.com.

; PTR Records
1.1 IN PTR ns1.ldn1.technofatty.com. ; 192.168.1.1
2.1 IN PTR ns2.ldn1.technofatty.com. ; 192.168.1.2
101.1 IN PTR pc1.ldn1.technofatty.com. ; 192.168.1.101
102.1 IN PTR dvr1.ldn1.technofatty.com. ; 192.168.1.102


Check BIND Configuration Syntax


Run the following command to check the syntax of the named.conf* files:
sudo named-checkconf

If your named configuration files have no syntax errors, you will return to your shell prompt and see no error messages. If there are problems with your configuration files, review the error messages then re-try named-checkconf .

The named-checkzone command can be used to check the correctness of your zone files. Its first argument specifies a zone name, and the second argument specifies the corresponding zone file, which are both defined in named.conf.local.

For example, to check the "ldn1.technofatty.com" forward zone configuration, run the following command (change the names to match your forward zone and file):
sudo named-checkzone ldn1.technofatty.com db.ldn1.technofatty.com

And to check the "168.192.in-addr.arpa" reverse zone configuration, run the following command (change the numbers to match your reverse zone and file):
sudo named-checkzone 168.192.in-addr.arpa /etc/bind/zones/db.168.192

When all of your configuration and zone files have no errors in them, you should be ready to restart the BIND service.

Restart BIND


Restart BIND:
sudo service bind9 restart

Your primary DNS server is now setup and ready to respond to DNS queries. Let's move on to creating the secondary DNS server.
 

Configure Secondary DNS Server


In most environments, it is a good idea to set up a secondary DNS server that will respond to requests if the primary becomes unavailable. Luckily, the secondary DNS server is much easier to configure.

On ns2, edit the named.conf.options file:
sudo nano /etc/bind/named.conf.options

At the top of the file, add the ACL with the private IP addresses of all of your trusted servers:
acl "trusted" {
192.168.1.1; # ns1 - can be set to localhost
192.168.1.2; # ns2
192.168.1.101; # pc1
192.168.2.102; # dvr1
};

Below the directory directive, add the following lines:
        recursion yes;
allow-recursion { trusted; };
listen-on { 192.168.1.2; }; # ns2 private IP address
allow-transfer { none; }; # disable zone transfers by default

forwarders {
8.8.8.8;
8.8.4.4;
};

Save and exit named.conf.options. This file should look exactly like ns1's named.conf.options file except it should be configured to listen on ns2's private IP address.

Now edit the named.conf.local file:
sudo nano /etc/bind/named.conf.local

Define slave zones that correspond to the master zones on the primary DNS server. Note that the type is "slave", the file does not contain a path, and there is a masters directive which should be set to the primary DNS server's private IP. If you defined multiple reverse zones in the primary DNS server, make sure to add them all here:
zone "ldn1.technofatty.com" {
type slave;
file "db.ldn1.technofatty.com";
masters { 192.168.1.1; }; # ns1 private IP
};

zone "168.192.in-addr.arpa" {
type slave;
file "db.168.192";
masters { 192.168.1.1; }; # ns1 private IP
};

Now save and exit named.conf.local.

Run the following command to check the validity of your configuration files:
sudo named-checkconf

Once that checks out, restart bind
sudo service bind9 restart

Now you have primary and secondary DNS servers for private network name and IP address resolution. Now you must configure your servers to use your private DNS servers.
 

Configure DNS Clients


Before all of your servers in the "trusted" ACL can query your DNS servers, you must configure each of them to use ns1 and ns2 as nameservers. This process varies depending on OS, but for most Linux distributions it involves adding your name servers to the /etc/resolv.conf file.

Ubuntu Clients


On Ubuntu and Debian Linux VPS, you can edit the head file, which is prepended to resolv.conf on boot:
sudo nano /etc/resolvconf/resolv.conf.d/head

Add the following lines to the file (substitute your private domain, and ns1 and ns2 private IP addresses):
search ldn1.technofatty.com     # your private domain
nameserver 192.168.1.1 # ns1 private IP address
nameserver 192.168.1.2 # ns2 private IP address

Now run resolvconf to generate a new resolv.conf file:
sudo resolvconf -u

Your client is now configured to use your DNS servers.

CentOS Clients


On CentOS, RedHat, and Fedora Linux VPS, simply edit the resolv.conf file:
sudo nano /etc/resolv.conf

Then add the following lines to the TOP of the file (substitute your private domain, and ns1 and ns2 private IP addresses):
search ldn1.technofatty.com  # your private domain
nameserver 192.168.1.1 # ns1 private IP address
nameserver 192.168.1.2 # ns2 private IP address

Now save and exit. Your client is now configured to use your DNS servers.

Test Clients


Use nslookup to test if your clients can query your name servers. You should be able to do this on all of the clients that you have configured and are in the "trusted" ACL.

Forward Lookup


For example, we can perform a forward lookup to retrieve the IP address of pc1.ldn1.technofatty.com by running the following command:
nslookup pc1

Querying "pc1" expands to "pc1.ldn1.technofatty.com because the search option is set to your private subdomain, and DNS queries will attempt to look on that subdomain before looking for the host elsewhere. The output of the command above would look like the following:
paula@ns2:~$ nslookup pc1
Server: 192.168.1.1
Address: 192.168.1.1#53

Name: host1.nyc2.example.com
Address: 192.168.1.101

Reverse Lookup


To test the reverse lookup, query the DNS server with pc1's private IP address:
nslookup 192.168.1.101

You should see output that looks like the following:
Server:     192.168.1.1
Address: 192.168.1.1#53

101.1.168.192.in-addr.arpa name = pc1.ldn1.technofatty.com.

If all of the names and IP addresses resolve to the correct values, that means that your zone files are configured properly. If you receive unexpected values, be sure to review the zone files on your primary DNS server (e.g. db.ldn1.technofatty.com and db.168.192).

Congratulations! Your internal DNS servers are now set up properly! Now we will cover maintaining your zone records.

 

Maintaining DNS Records


Now that you have a working internal DNS, you need to maintain your DNS records so they accurately reflect your server environment.

Adding Host to DNS


Whenever you add a host to your environment (in the same datacenter), you will want to add it to DNS. Here is a list of steps that you need to take:

Primary Nameserver



    • Forward zone file: Add an "A" record for the new host, increment the value of "Serial"

    • Reverse zone file: Add a "PTR" record for the new host, increment the value of "Serial"

    • Add your new host's private IP address to the "trusted" ACL (named.conf.options)


Then reload BIND:
sudo service bind9 reload

Secondary Nameserver



    • Add your new host's private IP address to the "trusted" ACL (named.conf.options)


Then reload BIND:
sudo service bind9 reload

Configure New Host to Use Your DNS



    • Configure resolv.conf to use your DNS servers

    • Test using nslookup


Removing Host from DNS


If you remove a host from your environment or want to just take it out of DNS, just remove all the things that were added when you added the server to DNS (i.e. the reverse of the steps above).
 

Conclusion


Now you may refer to your servers' private network interfaces by name, rather than by IP address. This makes configuration of services and applications easier because you no longer have to remember the private IP addresses, and the files will be easier to read and understand. Also, now you can change your configurations to point to a new servers in a single place, your primary DNS server, instead of having to edit a variety of distributed configuration files, which eases maintenance.

Once you have your internal DNS set up, and your configuration files are using private FQDNs to specify network connections, it is critical that your DNS servers are properly maintained. If they both become unavailable, your services and applications that rely on them will cease to function properly. This is why it is recommended to set up your DNS with at least one secondary server, and to maintain working backups of all of them.
Continue reading
359 Hits
0 Comments