Skip to content

Instantly share code, notes, and snippets.

Created September 27, 2017 03:04
Show Gist options
  • Save anonymous/db1b0603981580ae11262ab46d1713d4 to your computer and use it in GitHub Desktop.
Save anonymous/db1b0603981580ae11262ab46d1713d4 to your computer and use it in GitHub Desktop.
Centos 7 dns сервер

Centos 7 dns сервер



Ссылка на файл: >>>>>> http://file-portal.ru/Centos 7 dns сервер/


Свой DNS сервер на Centos 7
How to Setup DNS Server using Bind 9 on CentOS 7
Сетевые настройки в CentOS 7
























Setup BIND DNS Server on CentOS 7. An important part of managing server configuration and infrastructure includes maintaining an easy way to look up network interfaces and IP addresses by name, by setting up a proper Domain Name System DNS. Using fully qualified domain names FQDNs , instead of IP addresses, to specify network addresses eases the configuration of services and applications, and increases the maintainability of configuration files. Setting up your own DNS for your private network is a great way to improve the management of your servers. In this tutorial, we will go over how to set up an internal DNS server, using the BIND name server software BIND9 on CentOS 7, that can be used by your Virtual Private Servers VPS to resolve private host names and private IP addresses. This provides a central way to manage your internal hostnames and private IP addresses, which is indispensable when your environment expands to more than a few hosts. The Ubuntu version of this tutorial can be found here. If you are unfamiliar with DNS concepts, it is recommended that you read at least the first three parts of our Introduction to Managing DNS. Refer to the following table the relevant details:. Your existing setup will be different, but the example names and IP addresses will be used to demonstrate how to configure a DNS server to provide a functioning internal DNS. You should be able to easily adapt this setup to your own environment by replacing the host names and private IP addresses with your own. If you utilize multiple datacenters, you can set up an internal DNS within each respective datacenter. By the end of this tutorial, we will have a primary DNS server, ns1 , and optionally a secondary DNS server, ns2 , which will serve as a backup. Text that is highlighted in red is important! It will often be used to denote something that needs to be replaced with your own settings or that it should be modified or added to a configuration file. For example, if you see something like host1. We will start with configuring the options file. This is where we will define list of clients that we will allow recursive DNS queries from i. Using our example private IP addresses, we will add ns1 , ns2 , host1 , and host2 to our list of trusted clients:. Now that we have our list of trusted DNS clients, we will want to edit the options block. Add the private IP address of ns1 to the listen-on port 53 directive, and comment out the listen-on-v6 line:. Now save and exit named. Assuming that our private subnet is If your servers span multiple private subnets but are in the same datacenter, be sure to specify an additional zone and zone file for each distinct subnet. When you are finished adding all of your desired zones, save and exit the named. Now that our zones are specified in BIND, we need to create the corresponding forward and reverse zone files. The forward zone file is where we define DNS records for forward DNS lookups. According to our named. First, you will want to add the SOA record. It should look something like this:. After that, add your nameserver records with the following lines replace the names with your own. Then add the A records for your hosts that belong in this zone. Using our example names and private IP addresses, we will add A records for ns1 , ns2 , host1 , and host2 like so:. Reverse zone file are where we define DNS PTR records for reverse DNS lookups. On ns1 , for each reverse zone specified in the named. Edit the reverse zone file that corresponds to the reverse zone s defined in named. Then add PTR records for all of your servers whose IP addresses are on the subnet of the zone file that you are editing. In our example, this includes all of our hosts because they are all on the Be sure to substitute names and private IP addresses to match your servers:. Save and exit the reverse zone file repeat this section if you need to add more reverse zone files. If your named configuration files have no syntax errors, you will return to your shell prompt and see no error messages. If there are problems with your configuration files, review the error message and the Configure Primary DNS Server section, then try named-checkconf again. The named-checkzone command can be used to check the correctness of your zone files. Its first argument specifies a zone name, and the second argument specifies the corresponding zone file, which are both defined in named. When all of your configuration and zone files have no errors in them, you should be ready to restart the BIND service. Your primary DNS server is now setup and ready to respond to DNS queries. In most environments, it is a good idea to set up a secondary DNS server that will respond to requests if the primary becomes unavailable. Luckily, the secondary DNS server is much easier to configure. Define slave zones that correspond to the master zones on the primary DNS server. If you defined multiple reverse zones in the primary DNS server, make sure to add them all here:. Now you have primary and secondary DNS servers for private network name and IP address resolution. Now you must configure your servers to use your private DNS servers. Then add the following lines to the TOP of the file substitute your private domain, and ns1 and ns2 private IP addresses:. On Ubuntu and Debian Linux VPS, you can edit the head file, which is prepended to resolv. Add the following lines to the file substitute your private domain, and ns1 and ns2 private IP addresses:. For example, we can perform a forward lookup to retrieve the IP address of host1. The output of the command above would look like the following:. If all of the names and IP addresses resolve to the correct values, that means that your zone files are configured properly. If you receive unexpected values, be sure to review the zone files on your primary DNS server e. Your internal DNS servers are now set up properly! Now we will cover maintaining your zone records. Now that you have a working internal DNS, you need to maintain your DNS records so they accurately reflect your server environment. Whenever you add a host to your environment in the same datacenter , you will want to add it to DNS. Here is a list of steps that you need to take:. If you remove a host from your environment or want to just take it out of DNS, just remove all the things that were added when you added the server to DNS i. This makes configuration of services and applications easier because you no longer have to remember the private IP addresses, and the files will be easier to read and understand. Also, now you can change your configurations to point to a new servers in a single place, your primary DNS server, instead of having to edit a variety of distributed configuration files, which eases maintenance. Once you have your internal DNS set up, and your configuration files are using private FQDNs to specify network connections, it is critical that your DNS servers are properly maintained. If they both become unavailable, your services and applications that rely on them will cease to function properly. This is why it is recommended to set up your DNS with at least one secondary server, and to maintain working backups of all of them. Sign in Welcome, Login to your account. Sign in Recover your password. A password will be e-mailed to you. Home System Admin Setup BIND DNS Server on CentOS 7. On Jun 4, Install and configure BIND on your vps BIND Installation On CentOS Setting Up a Forwarding DNS Server On Debian Setup HTTPS in Apache web Server on CentOS Initial Server Setup with CentOS 7 Using the Private IP Address on your Cloud Server. Prev Post Setup Mail Server with Mail-in-a-Box on Ubuntu Next Post Initial Setup of a Fedora 21 Server. Recent Posts D-Link announces Omna Cam, the first… Feb 17, 0. Jan 21, 0. Jun 26, Feb 14, 0. Dec 12, 0. Nov 11, 0. Nov 4, 0. Dec 7, 0. Jun 9, 0. Aug 16, 0. Apr 23, 0. Jul 20, 0. Nov 3, 0. Aug 19, 0. Jul 6, 0. Feb 18, 0. May 7, 0. Jun 22, 2. May 16, 0. Feb 6, 0. Archives July June May April March February January December November October September August July June May April March February January December November October September August July June May April March February January October September August July June May Meta Log in Entries RSS Comments RSS WordPress.


Как убрать гель в домашних условиях
Чем питаются кролики в домашних условиях
Салаватская епархия расписание служб
Настройка DNS-сервера (bind) в CentOS/RHEL 7
Построить развертку методом нормального сечения
Количественные методы научно педагогических исследований
Сантехник ярославль вызвать
Setting Up DNS Server On CentOS 7
Аудио вечернее правило
Когда делают 3 узи
Установка Master DNS
Расписание автобусов красный электрик ногинск 2017
Экономический словарь английского консервация объекта
Лечение гемангиомы в москве
Сетевые настройки в CentOS 7
Рассказ вставил в рот
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment