[BlueOnyx:19670] Re: Bulk PTR

Michael Stauber mstauber at blueonyx.it
Wed Jun 8 19:46:16 -05 2016


Hi Alberto,

> How I could create a bulk of PTR using command line and be sure that the web
> interface is not going to erase all my changes, I have a /22 network to
> create so you can imagine how would be one by one using the web interface.

I just created a small script for you that allows you to do a mass
import of PTR records. You can find the tool here:

http://devel.blueonyx.it/docs/dnsPTR.tar.gz

This tarball contains two files:

dns-reverse-from-text.pl
records.txt

The records.txt is a simply semicolon separated CSV which (at this time)
contains the following example text:

10.1.128.1;255.255.255.255;alpha;smd.net
10.1.128.2;255.255.255.255;beta;smd.net
10.1.128.3;255.255.255.255;charlie;smd.net
10.1.128.4;255.255.255.255;delta;smd.net

So the columns must be in this format:

- IP
- Netmask
- Hostname
- Domain-Name

When you run ./dns-reverse-from-text.pl on the CLI, it just does nothing
and shows you this helptext:

# ./dns-reverse-from-text.pl
Command line options:
 -file | -f  Full path to file with PTR records to import.
 -help | -h  This helptext.

If you run it this way ...

./dns-reverse-from-text.pl -f records.txt

... it will import the PTR records from the specified textfile and will
write them into the BlueOnyx CODB database which the BlueOnyx GUI uses.

This will automatically update the DNS zone files, too. So once the
script is done running, you will have all the PTR records from the
textfile in your DNS. And you can then use the GUI to manage the records.

Let us know if that works for you or if you need anything else.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list