Various functions for performing dynamic DNS operations via nsupdate. There are Python modules to do this directly but it is not clear how well debugged these are hence sticking to running nsupdate.
nsupdate.create_a(server_ip, name, addr, ttl, tsig_key_file=None)
Dynamically create an A record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to create the record. |
name | The name of the new record to create. |
addr | The address of the new record to create. |
ttl | The TTL of the new record to create. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.create_aaaa(server_ip, name, addr, ttl, tsig_key_file=None)
Dynamically create an AAAA record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to create the record. |
name | The name of the new record to create. |
addr | The address of the new record to create. |
ttl | The TTL of the new record to create. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.create_cname(server_ip, name, host_name, ttl, tsig_key_file=None)
Dynamically create an AAAA record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to create the record |
name | The name of the new record to create. |
host_name | The name of the host record the CNAME record is for. |
ttl | The TTL of the new record to create. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.create_host_record(host_type, server_ip, name, addr, ttl, tsig_key_file=None)
Dynamically create a host record.
Parameter | Description |
---|---|
host_type | The type of host record (‘a’ or ‘aaaa’). |
server_ip | The IP address of the DNS server on which to create the record. |
name | The name of the new record to create. |
addr | The address of the new record to create. |
ttl | The TTL of the new record to create. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.create_ptr(server_ip, name, reverse_name, ttl, tsig_key_file=None)
Dynamically create a PTR record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to create the record. |
name | The name of the new record to create. |
reverse_name | The reverse space name of the new record to create. |
ttl | The TTL of the new record to create. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.delete_a(server_ip, name, tsig_key_file=None)
Dynamically delete an A record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to delete the record. |
name | The name of the new record to delete. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.delete_aaaa(server_ip, name, tsig_key_file=None)
Dynamically delete an AAAA record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to delete the record. |
name | The name of the new record to delete. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.delete_cname(server_ip, name, tsig_key_file=None)
Dynamically delete an AAAA record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to delete the record. |
name | The name of the record to delete. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.delete_host_record(host_type,server_ip, name, tsig_key_file=None)
Dynamically delete a host record.
Parameter | Description |
---|---|
host_type | The type of host record (‘a’ or ‘aaaa’). |
server_ip | The IP address of the DNS server on which to delete the record. |
name | The name of the new record to delete. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.delete_ptr(server_ip, name, tsig_key_file=None)
Dynamically delete a PTR record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to delete the record. |
name | The name of the new record to delete. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.run_nsupdate(command_file, tsig_key_file=None)
Run an nsupdate command file optionally using a TSIG key.
Parameter | Description |
---|---|
command_file | The name of a file containing some nsupdate commands. |
tsig_key_file | The name of the optional TSIG key file to use (can be None). |
nsupdate.update_a(server_ip, name, addr, ttl, tsig_key_file=None)
Dynamically update an A record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to update the record. |
name | The name of the record to update. |
addr | The new address of the record to update. |
ttl | The new TTL of the record to update. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.update_aaaa(server_ip, name, addr, ttl, tsig_key_file=None)
Dynamically update an AAAA record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to update the record. |
name | The name of the record to update. |
addr | The new address of the record to update. |
ttl | The new TTL of the record to update. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.update_cname(server_ip, name, new_name, host_name, ttl, tsig_key_file=None)
Dynamically update a CNAME record.
Parameter | Description |
---|---|
server_ip | The IP address of the DNS server on which to update the record. |
name | The name of the record to update. |
new_name | The new name of the record to update. |
host_name | The name of the host record the CNAME record is for. |
ttl | The new TTL of the record to update. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.update_cname_record(host_type,server_ip, name, new_name, host_name, ttl, tsig_key_file=None)
Dynamically update a CNAME record.
Parameter | Description |
---|---|
host_type | The type of CNAME record (‘cname’). |
server_ip | The IP address of the DNS server on which to update the record. |
name | The name of the record to update. |
new_name | The new name of the record to update. |
host_name | The name of the host record the CNAME record is for. |
ttl | The new TTL of the record to update. |
tsig_key_file | The name of the optional TSIG key file to use. |
nsupdate.update_record(host_type,server_ip, name, ttl, tsig_key_file=None)
Dynamically update a host record.
Parameter | Description |
---|---|
host_type | The type of CNAME record (‘cname’). |
server_ip | The IP address of the DNS server on which to update the record. |
name | The name of the record to update. |
ttl | The new TTL of the record to update. |
tsig_key_file | The name of the optional TSIG key file to use. |