first in case u read something seems non sense pls forget it i'm linux newbie and i do this for learning purpose.
i have two centos servers on different static ips 184.107.xxx.xxx and 184.107.yyy.yyy
there is a domain name "example.com" points to 184.107.xxx.xxx, and i have on this server example.com website and also other websites using virtual hosts on apache. the other centos server which has ip 184.107.yyy.yyy doesn't have a domain name and and i ssh to it using ip.
i wanted to have a DNS to host example.com and the other virtual hosts of apache. i set up DNS on both servers with the following configuration. (named.conf of centos server has ip 184.107.yyy.yyy)
Code:
# cat /etc/named.conf
options
{
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
recursion no;
allow-transfer { 184.107.xxx.xxx; };
notify yes;
allow-query { any; };
};
zone "." IN {
......
zone "example.com" IN {
type master;
file "example.com.fwd";
allow-update { none; };
};
zone "anotherexample.com" IN {
type master;
file "anotherexample.com.fwd";
allow-update { none; };
};
and zone file for my domain "example.com" (i just followed tutorials and and most of them using ns1.foo.bar, ns2.foo.bar)
Code:
$ORIGIN example.com.
$TTL 86400
@ IN SOA ns1.example.com. h.example.com. (
20100104 ; Serial number
3H ; Refresh 1 day
15M ; Retry 2 hours
1W ; Expire 41.67 days
1D ) ; Minimum TTL 2 days
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
@ IN MX 0 smtp.example.com.
ns1.example.com. IN A 184.107.yyy.yyy
ns2.example.com. IN A 184.107.xxx.xxx
example.com. IN A 184.107.xxx.xxx
smtp.example.com. IN A 184.107.xxx.xxx
that's all, i really appreciate ur help.