Posts Tagged ‘bind’

How to trace your DNS queries

.

Hi again

In this blog I just to introduce you with very useful command to trace the dns queries. as you know the DNS queries has two main categories which are Iterative and Recursive. sometimes in your network you will be faced with the DNS records problem. for Iterative queries ( having delegation in your dns zones to other dns servers)  the best way that you can understand which DNS server is causing the error is “dig” command. it can be installed on both Windows and Linux OSes. it has many options that I am really interested to tell you what are they but unfortunately time is little.

the command you should use is :

dig @your Caching Only Name Server or Iterative Dns Query Server IP Address +trace www.mehdibehamin.com

I am always waiting for your question about the DNS.

Reference : The dig manual

Regards

How to configure DNS Server for Mail Server on Linux

.

Hi again

First you should install the BIND DNS package in your linux server. you can simply install either with aptitude and yum installer or compile it  in your linux. (if you decided to compile approach just wait , i will explain you in my few next posts.)

so you should type:

aptitude install bind9

or

yum install bind.i386

(if you don’t know what exactly the name of package is, you can simply search your package name via the installer. for instance aptitude search bind)

then you should configure your mail server.

the main configuration file of the BIND by default is in the /etc/bind/ directory. therefore you start edit your named configuration files.

vim /etc/bind/named.conf

add the blow configuration before the last  }; in the file.

zone “mehdibehamin.com” {
type master;
file “/etc/bind/mehdibehamin.local”;
};

as you sea you should create the zone configuration file. for instance in the above configuration i set it as mehdibehamin.local.

therefore save the named.conf and in the /etc/bind/ create the new file with the mentioned name.and insert these configuration in it.

$TTL    86400
@               IN              SOA              mehdibehamin.com. root.mehdibehamin.com. (
1                                                                                                                                                                    ; Serial
604800         ; Refresh
86400         ; Retry
2419200         ; Expire
86400 )       ; Negative Cache TTL
;
@                         IN                NS              mehdibehamin.com.
www                 IN                 A                 1.2.3.4
mx                     IN                 A       192.168.0.1
mehdibehamin.com      IN      MX      10      mx.mehdibehamin.com.

note: you can copy the template of the configuration file from /etc/bind/db.local and then edit it :)

with the last configuration line all the packet which mail server sent to whatever@mehdibehamin.com transmited into 192.168.0.1 ip address. (which is the smpt or mail server IP address).

thats it.

regards


     Copyrighted Mehdi Behamin , All Rights Reserved
    
Blog has been visited 207161 times