[Pdns-users] Manually Changing SOA Serial Number

Elfyn McBratney elfyn at nyfle.co.uk
Fri Feb 25 06:35:52 UTC 2011


Hi there,

On 24 February 2011 21:29, Linda Pagillo <linda at lpdynamix.com> wrote:
> Actually, I need to know where to go to change the following…
>
> 1.)    SOA Serial number.
>
> 2.)    SOA Refresh value
>
> 3.)    SOA Expire value
>
> 4.)    SOA MNAME Value
>
> 5.)    SOA Retry Value
>
> 6.)    SOA TTL Value

All but 4) are dependent on which backend module you're using,
so without knowing whether your pdns instance(s) are backed by
a MySQL/PostgreSQL/Oracle database, or even something more
"exotic" like LDAP, it's hard to say.

Assuming that you went with the more common choice of MySQL,
adjusting the SOA for a domain is as simple as connecting to
whichever host mysqld is running on and issuing an UPDATE
command.  To illustrate, below is the SOA record for one of my
domains:

(admin at db-master-int:5432) [pdns] > select name,content
                                  > from records
                                  > where type='SOA'
                                  > and name='nyfle.co.uk';
    name     |                             content
-------------+------------------------------------------------------------------
 nyfle.co.uk | ns1.nyfle.co.uk admin.nyfle.co.uk 1298613484 3600 1800 86400 300

Here we have a serial of 1298613484, a slave refresh time of 3600s
(1 hour), a slave retry of 1800s, a slave expiry of 86400s (1 day)
and a minimum TTL of 300s. If I'm right and you're using MySQL, the
following should work assuming you have domain foo.bar:

  UPDATE records SET content='<your SOA record content>' WHERE
type='SOA' AND name='foo.bar'

Mind, I don't use MySQL. And you might not either... so I heavily
recommend reading through <http://doc.powerdns.com/>.

WRT MNAME (aka $ORIGIN), that's not supported in PowerDNS as it is in
BIND (at least as far as I know -- I could be wrong!). If you're
migrating existing BIND zones, zone2sql can handle that automatically
with its "--zone" option. Again, I'd recommend reading the manual at
the aforementioned URL as this is all explained there in a much more
coherent fashion. ;)

Best,
Elfyn



More information about the Pdns-users mailing list