V
V
vlarkanov2019-05-28 09:32:59
linux
vlarkanov, 2019-05-28 09:32:59

Nsupdate: is it possible to delete an entry in a dynamic zone by IP without knowing the domain name?

There is a script for updating ns records of several devices of the same type. When a vpn connection to the server is raised, the following is performed on the device:

function updatelan() {
echo "server $nsserver
        zone $domain
        update delete $HOSTNAME.$domain A
        update add $HOSTNAME.$domain. 1200 A $lan_ip
        show
        send" | nsupdate -k $key -v
}

those. first deletes the entry for our device, then add it with the current IP ($lan_ip).
Everything works, but there is a problem: in the dynamic zone there may be an entry with the same IP, but with a different name. Question: how to delete a record (or records) from a dynamic zone, knowing only ip?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2019-05-28
@res2001

Apparently in parallel it is necessary to lead the reverse zone. The reverse is where you get the name by IP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question