SDI exercises related DNS server
This section explains how to define two publicly visible DNS A records to your VMs. The objective is defining two
A
records sdi1
and sdi2
within
your respective DNS domain.
With respect to upcoming virtual host exercises the MI
department provides a public DNS integrated Bind based server
nssdi.mi.hdm-stuttgart.de
allowing for CLI updates. This works as follows:
-
Each working group being registered below 113475 Software defined Infrastructure has access to a respective zone file defining a subdomain of
sdi.mi.hdm-stuttgart.de
.-
Assuming you belong to group 3 your corresponding subdomain is
g3
.sdi.mi.hdm-stuttgart.de
. -
You'll find a
dnsupdate.sec
file containing the secret for authorizing your individual zone's management:hmac-sha256:mykey.g3:I5sDDS3L1BUHNGWU2n7LEmkWJfNq/giDuXb1u076VjQ=
Note
The per zone secrets are being created using tsig-keygen. The value appearing here does not reflect a production setting.
-
-
nsupdate allows for zone management as being explained below.
Adding an A
record for e.g. your
second sdi2
VM requires:
HMAC=hmac-sha256:mykey.g3:I5sDDS3L1BUHNGWU2n7LEmkWJfNq/giDuXb1u076VjQ=
goik>nsupdate -y $HMAC
> server nssdi.mi.hdm-stuttgart.de
> update add sdi2.g3.sdi.mi.hdm-stuttgart.de 86400 A 172.16.1.1
> send
> quit
goik>dig +noall +answer @nssdi.mi.hdm-stuttgart.de sdi2.g3.sdi.mi.hdm-stuttgart.de
sdi2.g3.sdi.mi.hdm-stuttgart.de. 86400 IN A 172.16.1.1
This entry will be globally visible:
goik>dig +noall +answer sdi2.g3.sdi.mi.hdm-stuttgart.de sdi2.g3.sdi.mi.hdm-stuttgart.de. 7069 IN A 172.16.1.1
You should now be able to use your VMs DNS name rather than its raw IP:
>ssh ...@sdi2.g3.sdi.mi.hdm-stuttgart.de
Deleting this DNS record works accordingly:
goik>nsupdate -y $HMAC > server nssdi.mi.hdm-stuttgart.de > > update del sdi2.g3.sdi.mi.hdm-stuttgart.de A > send > quit goik> goik>dig +noall +answer @nssdi.mi.hdm-stuttgart.de sdi2.g3.sdi.mi.hdm-stuttgart.de
Due to caching it'll however take up to you SOA or record specific settings for this deletion to be reflected globally. The subsequent query result indicates another 7069 seconds to go before issuing the next query:
goik>dig +noall +answer sdi2.g3.sdi.mi.hdm-stuttgart.de sdi2.g3.sdi.mi.hdm-stuttgart.de. 7069 IN A 172.16.1.1