Jump to content

Server DNS


alex

Recommended Posts

Instalarea si configurarea unui Server DNS

Pasul 1

Instalam bind9

# apt-get install bind9 dnsutils# /etc/init.d/bind9 stop

 

 

Pasul 2

In directorul /etc/bind vom configura urmatoarele fisiere si vom creea un director zones unde vom pune fisierele db.slashlinux.info si db.192 .

# nano /etc/bind/named.conf.local

 

named.conf.local

	zone "slashlinux.info" {  type master;  file "/etc/bind/zones/db.slashlinux.info";  };	zone "0.168.192.in-addr.arpa" {  type master;  file "/etc/bind/zones/db.192";  };

 

# nano /etc/bind/named.conf.options

 

named.conf.options

 forwarders {			0.0.0.0; ## IP-ul ISP-ului vostru	   };

 

# mkdir /etc/bind/zones# nano /etc/bind/zones/db.slashlinux.info

 

db.slashlinux.info

  $TTL 86400  $ORIGIN info.  slashlinux	  IN	  SOA	 ns1.slashlinux.info. root.slashlinux.info.(							 2010021700	  ; Serial							 10800		   ; Refresh							 3600			; Retry							 3600000		 ; Expire							 86400   )	   ; Minimum		  IN	  NS			  ns1.slashlinux.info.		  IN	  MX	  10	  mail.slashlinux.info.		  IN	  MX	  20	  slashlinux.info.		  IN	  A			   192.168.0.1  $ORIGIN slashlinux.info.  www			 IN	  A	   192.168.0.1  mail			IN	  A	   192.168.0.1  ns1			 IN	  A	   192.168.0.1  root			IN	  A	   192.168.0.1

 

# nano /etc/bind/zones/db.192

 

db.192

  $TTL 86400  $ORIGIN info.  slashlinux	  IN	  SOA	 ns1.slashlinux.info. root.slashlinux.info.(							 2010021700	  ; Serial							 10800		   ; Refresh							 3600			; Retry							 3600000		 ; Expire							 86400   )	   ; Minimum		  IN	  NS			  ns1.slashlinux.info.		  IN	  MX	  10	  mail.slashlinux.info.		  IN	  MX	  20	  slashlinux.info.		  IN	  A			   192.168.0.1  $ORIGIN slashlinux.info.  www			 IN	  A	   192.168.0.1  mail			IN	  A	   192.168.0.1  ns1			 IN	  A	   192.168.0.1  root			IN	  A	   192.168.0.1

 

Pasul 3

Restartam bind9 si verificam cu comanda dig.

# /etc/init.d/bind9 start# rndc reload# dig slashlinux.info

 

output-ul comenzii dig

; <<>> DiG 9.7.0-P1 <<>> slashlinux.info;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43972;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0;; QUESTION SECTION:;slashlinux.info.			   IN	  A;; ANSWER SECTION:slashlinux.info.		82101   IN	  A	   192.168.0.1;; AUTHORITY SECTION:slashlinux.info.		82101   IN	  NS	  ns1.slashlinux.info.;; Query time: 1 msec;; SERVER: 193.138.192.2#53(192.168.0.0);; WHEN: Thu Aug  4 17:09:45 2011;; MSG SIZE  rcvd: 67

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...