Thursday, August 27, 2015

Bind-Configuration - Named.conf

Named.conf Configuration file example:

acl” is access-control list, a group of networks and/or IP addresses. “ACL” are created to be applied in sections like “allow-recursion”… If an ACL is created but not applied, then it is useless
Named.conf configuration File (continue)
options in "named.conf"
“listen-on port 53 { listenon; }; the name server will listen to reply coming on the interface that has an IP address that is listed in the “listenon” access-list, also the request should have port 53 as destination port number ; instead of an acl name, you can type ip addresses of the interfaces separated by ;
Directory “/var/named” is the directory that contains cache and zone files.
“recursion” allow or disallow recursive lookup.
“forward only” it forward dns lookup and it doesn’t do recursive, “forward first” it tries first to forward and if it doesn’t get a reply, it does a recursive
“forwarders is a list DNS servers dedicated to be forwarders, so the server will send the request to them
blackhole” specify which Network/Ips are not allowed to query the server
"allow-query" specifies the clients that are allowed to request information about this zone. The default is to allow all query requests.
"allow-transfer" specifies the slave DNS servers that are allowed to request a transfer of the zone. Default is to allow all transfer requests. 
"Allow-Update" specifies the hosts that are allowed to dynamically update their information in their zone file. The default is to deny dynamic updates

Need to find a job as remote system analyst ?
Create your profile in this website:

Monday, August 24, 2015

DNS Queries

Queries:
Recursive lookup: If a PC needs to access www.http-cloud.com he will ask his DNS server (the DNS server that he has statically or he received from the DHCP server with the DHCP lease), if the DNS server is authoritative for the zone “http-cloud.com”, it will fetch the IP address of the record “www” and it will give to the clientPC. The clientPC will cache this resolution and it will use the IP address received to communicate with the www.http-cloud.com server
Forward Query:
•If there is a user who has an address in hotmail. The Client-PC needs to access www.hotmail.com he will ask his server for the IP address of this hostname. In case the DNS server is not authoritative for the zone “hotmail.com”, and in case the DNS server have an IP address of a forwader ( example an ISP server), he will forward the query  to the IP address of the ISP-DNS server. The ISP-DNS server will be responsible for finding the record for www.hotmail.com and send it to the DNS server of the client. The DNS server of the Client will cache this record and will return the record to the client-PC.
Recursive Query:
If a client PC query his DNS server for the IP of www.centos.org and if DNS server is not authoritative for the zone “centos.org” and if that DNS-server doesn’t have the IP of a forwarder. The DNS server will do a recursive query:
The DNS-Server will ask the root name servers for the NS records (name servers records) of the “.org” zone
Once the DNS-Server have the an IP address of a Name server of the “.org” zone, he will query it for the NS records (name servers records) of the zone centos
Once the DNS-Server get an IP address of a name server of the “centos.org” zone, he will query that  name server for the hostname “www”.
Once the DNS-Server will get the reply, he will cache it and send it back to the client.

As the root zone is the parent zone of the zone “org”, so the root zone should have NS records for the “org” zone. As well as the “org” zone is the parent zone for the “centos”, the “org” zone will have the NS records for the “centos” zone
Using the dig utility:
Dig utility is a command line tool that allows to perform DNS lookups and debug a nameserver configuration.:
To lookup a nameserver for a particular domain name  (means to know the DNS server responsible for  that particular domain name):
Dig name NS
  Example: DIG http-cloud.com ns
To get root servers in the world “dig . NS”
To get the com servers “dig com NS”
To lookup for the IP address of a specific A record:
Dig name A
   Example: Dig www.http-cloud.com A
The PTR lookup: to lookup for a hostname if we have the IP address:
Dig –x address
  Example: Dig –x 192.168.10.10
If you want to get a short answer:
Dig www.http-cloud.com +short
Dig get1get.com mx +short
Another DNS client tool “nslookup” is used by windows and Linux. Dig utility is more recent.

Looking for a flexible part-time job ? Check these opportunities:
https://www.cv-cloud.com/job/

You can our IT services on http://www.http-cloud.com


I hope this was helpful, and I would like to thank you for reading

DNS or Bind in Linux -1

DNS Domain Name System is a hierarchical  distributed naming system for computers services, or any resource connected to the internet or private network. Mostly, It associates information from domain names with the IP addresses. Also Domain name systems are used for obtaining email servers in a specific domain.
Domain Name Space:
A domain name space consists of a tree of domain names. Each node in the tree has  zero or more resoruce records associated with this domain name. The tree sub-divides into zones beginning at the root zone.
DNS root zone is the top-level DNS zone in the hierachical namespace of the DNS of the itnernet. The root zone is managed by the IANA and ICANN.
NS records are the DNS servers ( or name servers) records  for a zone.
Root zone is “.” is the root of the DNS tree on the internet. It is the zone that contains the zones: com, net,gov, org, in, nl….
The root name servers are the DNS servers that are authoritative for the root zone.
DNS Records:
DNS servers are used to resolve name to IP addresses. We have different types of records that can be resolved:
A record is the record for a host name and it can be used to resolve the IP address from the name
NS record is a record for a domain name and it can be used to get the list of DNS servers that are authoritiative for this domain.
MX is a record for the email servers of a specific domain name, it maps your domain name to one or more of FQDN of email servers.  These records will have different metrics. The one with the lowest metric is the best

Follow us in our next Blog for more about DNS.
I hope this was helpful, and I would like to thank you for reading