Sunday, November 17, 2019

How To Configure DNS (BIND) Server on CENTOS

This Artical is based On Cent os 6. So if Your r using Another Plat Form You Have To Find Out Your installation Directory And Some Commands.


This Blog Is For ISP's. To developing DNS.

Undestanding DNS.

The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities.

Understanding Forward Lookup Zone.

Forward DNS is a type of DNS request in which a domain name is used to obtain its corresponding IP address. A DNS server is said to resolve a domain name when it returns its IP address. A forward DNS request is the opposite of a reverse DNS lookup. Forward DNS is also known as a forward DNS lookup.

Understanding Reverse Lookup Zone.

Reverse DNS is IP address to domain name mapping - the opposite of forward (normal) DNS which maps domain names to IP addresses. ... With forward DNS, you point the zone to your DNS server by registering that domain name with a registrar.

Change Your IP Addresses And Domain name
192.168.1.1 to Your Ip And skynet.com To Your Domain Name.

Contents 


  • 1 BIND Installation

Installing Bind using YUM respositories.

yum install bind bind-utils
2  BIND Configuration

First You Have to Edit the main config file:

vi /etc/named.conf

 2.1 add your DNS Server IP Address to the listen directive:

Adding Your System IP Address After 127.0.0.1; 
Eg. 192.168.1.1 is My System IP.
My ip pool is 192.168.1.0/23
Then Enable quries From All Clients.
Then Create Zone Files.

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
 listen-on port 53 { 127.0.0.1; 192.168.1.1;};
 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";
 allow-query {
  any;
  };
 allow-transfer {
  localhost;
  192.168.1.0/23;
  any;
  };
 recursion yes;

 dnssec-enable yes;
 dnssec-validation yes;

 /* Path to ISC DLV key */
 bindkeys-file "/etc/named.iscdlv.key";

 managed-keys-directory "/var/named/dynamic";
 forwarders {
  8.8.8.8;
  };
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
 type hint;
 file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

//Forward lookup zone file
zone "skynet.com" {
 type master;
 file "/var/named/skynet.com.hosts";
 };
//Reverse Lookup zone For ip addresses.
zone "2.168.192.in-addr.arpa" {
 type master;
 file "/var/named/192.168.2.rev";
    allow-transfer{192.168.1.1; };
 };
//Reverse Lookup Zone For Ip addresses.

zone "1.168.192.in-addr.arpa" {
 type master;
 file "/var/named/192.168.1.rev";
    allow-transfer{192.168.1.1; };
 };
Here I will Create 2 Reverse Lookup Zone which is For My IPs.
192.168.1.1/24 & 192.168.2.1/24
So This Both Reverse Zones Belongs To My Forward Zone.

  • 3 Editing Zones config File.

3.1 First We Config Forward Zone skynet.com.host.

Using VI Command   vi /var/named/skynet.com.hosts.

$ttl 38400
skynet.com. IN SOA ns1.skynet.com. admin@skynet.com. (
   2018100227
   10800
   3600
   1209600
   38400 )
skynet.com. IN NS ns1.skynet.com.
skynet.com. IN NS ns2.skynet.com.
ns1.skynet.com. 600  IN A 192.168.1.1
ns2.skynet.com. 1200 IN A 192.168.2.1 #secondary System Ip
skynet.com. IN A 192.168.1.1
www.skynet.com. IN A 192.168.1.1
3.2 Editing Reverse Zone

using vi Command  vi  /var/named/192.168.1.rev.
$ttl 38400
1.168.192.in-addr.arpa. IN SOA skynet.com. admin@skynet.com. (
   1498111012
   10801
   3600
   604800
   38400 )
1.168.192.in-addr.arpa. IN NS ns1.skynet.com.
1.168.192.in-addr.arpa. IN NS ns2.skynet.com.
1 IN PTR node-ns1.skynet.com #Replace Your Reverse Lookup. For IP Address 192.168.1.1
You Can add You all Ip Addresses of 192.168.1.1/24 Ranges For PTR/rdns Lookup.
using Copy and Past Last PTR Record.

Config Secondary Reverse Lookup Zone.

This Reverse Zone is For Your Second Ip Pool.

vi  /var/named/192.168.2.rev.
$ttl 38400
2.168.192.in-addr.arpa. IN SOA skynet.com. admin@skynet.com. (
   1498111012
   10801
   3600
   604800
   38400 )
2.168.192.in-addr.arpa. IN NS ns1.skynet.com.
2.168.192.in-addr.arpa. IN NS ns2.skynet.com.
1 IN PTR node-ns1.skynet.com #Replace Your Reverse Lookup. For IP Address 192.168.2.1
After Creting forward And Reverse Lookup Zones. Check All Config .

4 Test Config Files


named-checkconf
This Command Check All Syntex and revert Back You.

5 BIND start and enable for auto-start on boot

service named start
service named enable

This 2 Command Start service And Auto start on bootup.


:NOTE:

Now You have To Point Your Domain To Your Name Server. 
So If You Purchase Your Domain From godaddy or google or any other Hosting Provider.
You Have To Update Your Nameserver From Provider panel.
Host Provider will update When Your Name server got Reply.
So from Local Network You Have to ping .
Your Name server like My Nameserver is ns1.skynet.com 
So will " ping -t ns1.skynet.com " if reply will come with pointed Ip Address Then Your Hosting Provider will update and will take up to 24hrs.

See Example of Godaddy.
and Also Update 3 Host Name like ns1 ,ns2 ,www .TO Godaddy Panel.
See Example.

After This All Config Done. Then You Will Send Request To Your Ip Provider To Updating rdns Entries.








Saturday, November 16, 2019

DMA RADIUS MANAGER THEME UPDATED

This is updated radius manager theme. And will 100% working.
Its a css and java based theme with reseller panel.

1) Dashboard
2) In New User Autometically Group Selected based on plan. and Prepaid based System.
3)User Authentication Log of Every 10s.




Friday, November 8, 2019

DMA radius Manager rmconntrack Repair table ‘./conntrack/xxxx@xxxxxx@xxxxxx.MYI’;

Recommendations:
  • Make sure you aave plenty of Disk Space. Storage drive should be fast for high load servers preferably SSD or RAID based storage ,
  • Perform tuning to enhance the mysql engine
  • To repair table …
    Goto the conntrack folder [Centos]
    cd /var/lib/mysql/conntrack/
    service mysql stop
    # Change the file number as shown in the error 
    myisamchk -r -v -f 2016@002d12@002d16.MYI
    After repair done. restart mysql using "service mysqld restart". check CTS LOG.

 Dear all, Kindly Check Out skynetconsult.in For More Blog. Regards, skynetConsultacy.