How to change SOA record template -> root.domain.tld

Questions regarding the DNS Server
BIND
krzysztofek
Posts: 16
Joined: Fri Jan 09, 2015 2:29 pm

How to change SOA record template -> root.domain.tld

Postby krzysztofek » Thu Mar 19, 2015 9:47 am

Hello,
After editing my DNS zone, Vesta editing my soa record to root.mydomain.tld. I want to change this to admin.mydomain.tld because root@mydomain.tld is unroutable. I searched in dns template but i didn't found it.
Best regards and thanks for great Control Panel! I using it on 2 production servers and it works well.

skurudo
VestaCP Team
Posts: 7642
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: How to change SOA record template -> root.domain.tld

Postby skurudo » Thu Mar 19, 2015 11:17 am

You searched here?
/usr/local/vesta/data/templates/dns/

krzysztofek
Posts: 16
Joined: Fri Jan 09, 2015 2:29 pm

Re: How to change SOA record template -> root.domain.tld

Postby krzysztofek » Thu Mar 19, 2015 11:42 am

Yes, i don't see where i should change SOA.

Code: Select all

ID='1' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns1%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='2' RECORD='@' TYPE='NS' PRIORITY='' VALUE='%ns2%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='3' RECORD='@' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='4' RECORD='mail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='5' RECORD='www' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='6' RECORD='pop' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='7' RECORD='ftp' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='8' RECORD='@' TYPE='MX' PRIORITY='10' VALUE='mail.%domain%.' SUSPENDED='no' TIME='%time%' DATE='%date%'
ID='9' RECORD='@' TYPE='TXT' PRIORITY='' VALUE='"v=spf1 a mx ip4:%ip% ?all"' SUSPENDED='no' TIME='%time%' DATE='%date%'

skurudo
VestaCP Team
Posts: 7642
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: How to change SOA record template -> root.domain.tld

Postby skurudo » Thu Mar 19, 2015 2:51 pm

/etc/bind/ - ?

krzysztofek
Posts: 16
Joined: Fri Jan 09, 2015 2:29 pm

Re: How to change SOA record template -> root.domain.tld

Postby krzysztofek » Fri Mar 20, 2015 1:08 pm

I found in /etc/bind: root.localhost. in db.X files. Which one should I change?

Code: Select all

list of files:
bind.keys  db.empty    named.conf.default-zones  zones.rfc1918
db.0      db.local    named.conf.local
db.127      db.root     named.conf.options
db.255      named.conf  rndc.key

sol
Posts: 72
Joined: Fri Jan 16, 2015 12:19 pm
Location: UA
Contact:

Re: How to change SOA record template -> root.domain.tld

Postby sol » Mon Apr 06, 2015 2:31 pm

/home/user/conf/dns/domain.com.db

krzysztofek
Posts: 16
Joined: Fri Jan 09, 2015 2:29 pm

Re: How to change SOA record template -> root.domain.tld

Postby krzysztofek » Wed Jul 12, 2017 7:04 am

Finally...
I found solution here: viewtopic.php?t=9957

skurudo wrote:I think you want change root.domain.com ?
Then /usr/local/vesta/func/domain.sh

Code: Select all

# Update domain zone
update_domain_zone() {
    domain_param=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
    eval $domain_param
    SOA=$(idn --quiet -a -t "$SOA")
    if [ -z "$SERIAL" ]; then
        SERIAL=$(date +'%Y%m%d01')
    fi
    zn_conf="$HOMEDIR/$user/conf/dns/$domain.db"
    echo "\$TTL $TTL
@    IN    SOA    $SOA.    root.$domain_idn. (
                                            $SERIAL
                                            7200
                                            3600
                                            1209600
                                            180 )


Return to “DNS Server”



Who is online

Users browsing this forum: No registered users and 1 guest