yAm
yAm

Reputation: 11

Dnspython- How to create a PTR dns crecord?

Is there any way to create PTR record with python(dnspython)? I want the record to locate in Reverse Lookup Zone in the appropriate X.Y.Z.in-addr.arpa zone.

I have tried the following but it did not work for me:

record = dns.update.Update('22.113.170.in-addr.arpa.')
record.add('26.22.113.170.in-addr.arpa.', 300, 'PTR', 'new-fqdn-please-work.com')
dns.query.tcp(record, DNS_SERVER_ADDRESS, timeout=5)

I also tried: record.add('26.22.113.170',.....)

I do not understand what am I doing wrong

Upvotes: 0

Views: 232

Answers (0)

Related Questions