Hello!
I’m fairly new to all of this and have been following lots of guides. The guide I followed for this was http://www.servermom.org/how-to-install-and-setup-bind9-on-ubuntu-server/136/ .
Basically I successfully set up my first domain (domain1) so it points to ns1.domain1.com and ns2.domain1.com and works perfect.
When I went to set up my second domain (domain2) I added it to my /etc/bind/named.conf.local file with this code:
zone “domain2.com” { type master; file “/etc/bind/zones/domain2.com.db”; };
Then I went to edit the db file which is this code:
zone “wakeupontop.com” { type master; file “/etc/bind/zones/wakeupontop.com.db”; };
; BIND data file for domain.com ; $TTL 14400 @ IN SOA ns1.domain.com. host.domain.com. ( 201006601 ; Serial 7200 ; Refresh 120 ; Retry 2419200 ; Expire 604800) ; Default TTL ; domain.com. IN NS ns1.domain.com. domain.com. IN NS ns2.domain.com.
domain.com. IN MX 10 mail.domain.com. domain.com. IN A xxx.xxx.xxx.xxx
ns1 IN A xxx.xxx.xxx.xxx ns2 IN A xxx.xxx.xxx.xxx www IN CNAME domain.com. mail IN A xxx.xxx.xxx.xxx ftp IN CNAME domain.com. domain.com. IN TXT “v=spf1 ip4:xxx.xxx.xxx.xxx a mx ~all” mail IN TXT “v=spf1 a -all”
My question is… How do I edit the DB file. Where do I put domain2 and domain1?
I really appreciate the help!
Matt
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
zone “wakeupontop.com” { <br>type master; <br>file “/etc/bind/zones/wakeupontop.com.db”; <br>}; <br> <br>that is not in the DB code… I accidentally put that on my post :\ cant figure out how to take it off.
Check your /etc/bind/named.conf.local file and in the zones section make it look like this. <br><pre>zone “domain1.com” { <br>type master; <br>file “/etc/bind/zones/domain1.com.db”; <br>}; <br> <br>zone “domain2.com” { <br>type master; <br>file “/etc/bind/zones/domain2.com.db”; <br>};</pre> <br> <br>Now go to /etc/bind/zones and create the find domain2.com.db and add the following. ns1 and ns2 are from domain1. <br><pre>; BIND data file for domain2.com <br>; <br>$TTL 14400 <br>@ IN SOA ns1.domain1.com. host.domain1.com. ( <br>201006601 ; Serial <br>7200 ; Refresh <br>120 ; Retry <br>2419200 ; Expire <br>604800) ; Default TTL <br>; <br>domain2.com. IN NS ns1.domain1.com. <br>domain2.com. IN NS ns2.domain1.com. <br> <br>domain2.com. IN MX 10 mail.domain2.com. <br>domain2.com. IN A xxx.xxx.xxx.xxx <br> <br>ns1 IN A xxx.xxx.xxx.xxx <br>ns2 IN A xxx.xxx.xxx.xxx <br>www IN CNAME domain2.com. <br>mail IN A xxx.xxx.xxx.xxx <br>ftp IN CNAME domain2.com. <br>domain.com. IN TXT “v=spf1 ip4:xxx.xxx.xxx.xxx a mx ~all” <br>mail IN TXT “v=spf1 a -all”<pre>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.