Open rabbitmac opened 1 year ago
TTL 1D @ IN SOA RabbitMac.ferrari.com. rname.ferrari.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum @ IN NS ferrari.com. ferrari.com. IN A 181.1.1.1 www IN A 181.1.1.1 RabbitMac IN A 181.1.1.1
$TTL 1D @ IN SOA RabbitMac.ferrari.com. rname.ferrari.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum @ IN NS ferrari.com. 1 IN PTR ferrari.com. 1 IN PTR www.ferrari.com. 1 IN PTR RabbitMac.ferrari.com.
set ipaddress
yum install bind*
systemctl enable named.service
vim /etc/resole.conf
search ferrari.com nameserver 181.1.1.1
vim /etc/host
127.0.0.1 localhost.localdomain 181.1.1.1 ferrai.com 181.1.1.1 www.ferrari.com
vim /etc/named.conf
options { listen-on port 53 { 181.1.1.1; }; ( 11th line change ipaddress ) listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; secroots-file "/var/named/data/named.secroots"; recursing-file "/var/named/data/named.recursing"; allow-query { 181.1.1.0; 181.1.1.1; }; (19th line change network ip system ip)
};
logging { channel default_debug { file "data/named.run"; severity dynamic; }; };
zone "." IN { type hint; file "named.ca"; };
zone "ferrari.com" IN { type master; (for forward lookup) file "ferrari.com"; }; zone "1.1.181.in-addr.arpa" IN { type master; (revers lookup) file "ferrari.local"; };
include "/etc/named.rfc1912.zones"; include "/etc/named.root.key";
cd /var/named
cp named.localhost ferrari.com
cp named .localhost ferrari.com
vim ferrari .com
$TTL 1D @ IN SOA RabbitMac.ferrari.com. rname.ferrari.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum @ IN NS ferrari.com. ferrari.com. IN A 181.1.1.1 www IN A 181.1.1.1 RabbitMac IN A 181.1.1.1
vim ferrari.local
$TTL 1D @ IN SOA RabbitMac.ferrari.com. rname.ferrari.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum @ IN NS ferrari.com. 1 IN PTR ferrari.com. 1 IN PTR www.ferrari.com. 1 IN PTR RabbitMac.ferrari.com.
chmod 777 /var/named/ferrari.local
chmod 777 /var/named/ferrari.com
nslookup ferrari.com
nslookup ipaddress (reverse zone)