JAVA SCRIPT

RH 253: HOW TO SET UP SUBDOMAIN SERVER

    TO SET UP SUBDOMAIN SERVER

MASTERS MACHINE

1. vim /var/named/forward.zone
   subdomain.llc   IN NS           server.matrix.com.
2. service network restart


 SUBDOMAIN MACHINE

1. yum install bind caching-nameserver -y
2. vim /etc/named.conf                        ->edit this file
3. named-checkconf   /etc/named.conf
4. cd /var/named
5. cp localhost.zone  forward.zone
6. vim forward.zone                               ->edit this file
7. named-checkzone  <domainname>   forward.zone
8. cp forward.zone reverse.zone
9. vim reverse.zone                               ->edit this file
10. named-checkzone  <domainname>   reverse.zone 
13.vim /etc/resolv.conf                          ->edit this file
14.service named restart
15.chkconfig named on

CLIENT

1. vim /etc/resolv.conf    ->edit the file
2.  dig       <hostname>
3.  host      <hostname>
4.  host      <IP>
5.  nslookup  <IP>
6.  nslookup  <hostname>




 CONFIGURATION FILES


1.  masters-forward


$TTL    86400
@        IN SOA    server.example.com.       root (
                    45        ; serial (d. adams)
                    3M        ; refresh
                    3M        ; retry
                    1W        ; expiry
                    1D )        ; minimum

            IN NS        server.example.com.
            IN NS        llc.subdomain.example.com.
server         IN A            192.168.0.42
slave         IN A            192.168.0.10
llc.subdomain    IN A            192.168.0.33
test         IN A            192.168.0.1




2.  subdomain-forward

$TTL    86400
@        IN SOA     llc.subdomain.example.com.      root (
                    42        ; serial (d. adams)
                    3H        ; refresh
                    15M        ; retry
                    1W        ; expiry
                    1D )        ; minimum

            IN NS           llc.subdomain.example.com.   
llc         IN A        192.168.0.33
client1         IN A        192.168.0.30
client2         IN A        192.168.0.31
client3         IN A        192.168.0.32


3.  subdomain-named


options {
directory "/var/named";
forwarders { 192.168.0.42; };
};

zone "subdomain.example.com"{
type master;
file "forward.zone";
};

zone "0.168.192.in-addr.arpa"{
type master;
file "reverse.zone";
};



4.   subdomain-resolv

nameserver 192.168.0.33


5. subdomain-reverse


$TTL    86400
@        IN SOA     llc.subdomain.example.com.      root (
                    42        ; serial (d. adams)
                    3H        ; refresh
                    15M        ; retry
                    1W        ; expiry
                    1D )        ; minimum

            IN NS           llc.subdomain.example.com.   
33            IN PTR           llc.subdomain.example.com.   
30            IN PTR           client1.subdomain.example.com.   
31            IN PTR           client2.subdomain.example.com.   
32            IN PTR           client3.subdomain.example.com.   




If you found this post useful, I would really love it, if you can Like the Page, or share it with your Facebook/Google+/Twitter Friends... It will keep me motivated. Thank you!

No comments:

Post a Comment