I am using bind9 on a dedicated vps with ip: xx.xx.xx.xx
And i have vps server with webserver and its ip: yy.yy.yy.yy
Question: it is correct to point nameservers, e.g. ns1.domain.com/ns2.domain.com to bind9 server with following ip: xx.xx.xx.xx then on bind9 server create a zone file with a following values:
; BIND data file for domain.com
;
;$TTL 14400
$TTL 3600
@ IN SOA dns1.domain.com. srv.domain.com. (
2014241000 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800) ; Default TTL
;
@ IN NS dns1.domain.com.
@ IN NS dns2.domain.com.
@ IN MX 1 ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ALT3.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ALT4.ASPMX.L.GOOGLE.COM.
mail IN CNAME ghs.googlehosted.com.
@ IN A yy.yy.yy.yy
dns1 IN A xx.xx.xx.xx
dns2 IN A xx.xx.xx.xx
www IN A yy.yy.yy.yy
ftp IN A yy.yy.yy.yy
@ IN TXT "v=spf1 a mx ip4:yy.yy.yy.yy include:spf.mandrillapp.com include:_spf.google.com ?all"
In a short: pointing nameserver (ns1,ns2) to bind (DNS server) then pointing bind to another server (webserver without bind).