If you're running NetworkManager I belief most Linux releases with a desktop environment do , you'll need to keep it from getting the DNS servers from your connection e. Finally, to test if your DNS server is accepting the connection and returns a proper answer, request a domain using your client. Don't forget to change the As a starter I suggest to change the DNS settings of your router.
The manual of your router probably has this covered, otherwise Google has. When your router requires a secondary DNS, just use your resolver's IP again or, if that doesn't work, use some public provider which you trust most I suggest 1. This covers all requests made from your home network.
Keep in mind, any resolver you use will probably log your queries. We will start with configuring the options file. This is where we will define a 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.
Currently, the start of the block looks like the following:. Below the directory directive, add the highlighted configuration lines and substitute in the proper ns1 IP address so it looks something like this:.
When you are finished, save and close the named. Aside from a few comments, the file should be empty. Here, we will specify our forward and reverse zones. 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. According to our named. We will base our forward zone file on the sample db.
Copy it to the proper location with the following commands:. First, you will want to edit the SOA record. Every time you edit a zone file, you need to increment the serial value before you restart the named process.
It should now look something like this:. Next, delete the three records at the end of the file after the SOA record. At the end of the file, add your name server records with the following lines replace the names with your own. Now, 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:.
On ns1 , for each reverse zone specified in the named. We will base our reverse zone file s on the sample db. Copy it to the proper location with the following commands substituting the destination filename so it matches your reverse zone definition :.
Edit the reverse zone file that corresponds to the reverse zone s defined in named. In the same manner as the forward zone file, you will want to edit the SOA record and increment the serial value.
It should look something like this:. Now delete the two records at the end of the file after the SOA record. 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:. Server: The DNS server works right after installation. You need to configure it according to your usage purposes. First, allow BIND9 to work through the firewall. The "listen-on" directive allows you to specify the networks that the DNS server will serve.
Don't write this or write "any;" to work for all addresses. BIND9 only allows local queries by default. If you want to use the name servers for your anotherdomain.
The DNS records for anotherdomain. You can simply ask our support team to configure your DNS server on Debian 9 for you. If you enjoy reading this blog post on how to configure your DNS server using BIND on Debian 9 , feel free to share it on social networks using the shortcuts below, or simply leave a comment. Thank you.
0コメント