"INFO: REKRUTMEN P3K MULAI 2019"

Setting DNS Server dengan BIND di Redhat 9


BIND Configuration

This chapter assumes that you have a basic understanding of BIND and DNS; it does not attempt to explain the concepts of BIND and DNS. This chapter does explain how to use the Bind Configuration Tool (redhat-config-bind) to configure basic BIND server zones. The Bind Configuration Tool creates the /etc/named.conf configuration file and the zone configuration files in the /var/named directory each time you apply your changes.

Important Important
 

Do not edit the /etc/named.conf configuration file. Bind Configuration Tool generates this file after you apply your changes. If you want to configure settings that are not configurable using Bind Configuration Tool, add them to /etc/named.custom.

The Bind Configuration Tool requires the X Window System and root access. To start the Bind Configuration Tool, go to the Main Menu Button (on the Panel) => System Settings => Server Settings => Domain Name Service or type the command redhat-config-bind at a shell prompt (for example, in an XTerm or GNOME-terminal).

Figure 21-1. Bind Configuration Tool

The Bind Configuration Tool configures the default zone directory to be /var/named. All zone files specified are relative to this directory. The Bind Configuration Tool also includes basic syntax checking when values are entered. For example, if a valid entry is an IP address, you are only allowed to type numbers and periods (.) into the text area.

The Bind Configuration Tool allows you to add a forward master zone, a reverse master zone, and a slave zone. After adding the zones, you can edit or delete them from the main window as shown in Figure 21-1.

After adding, editing, or deleting a zone, you must choose click the Save button or select File => Save to write the /etc/named.conf configuration file and all the individual zone files in the /var/named directory. Saving changes also causes the named service to reload the configuration files. Selecting File => Quit saves the changes before quitting the application.

21.1. Adding a Forward Master Zone

To add a forward master zone (also known as a primary master), click the New button, select Forward Master Zone, and enter the domain name for the master zone in the Domain name text area.

A new window as shown in Figure 21-2 will appear with the following options:

  • Name — Domain name that was just entered in the previous window.

  • File Name — File name of the DNS database file, relative to /var/named. It is preset to the domain name with .zone appended to it.

  • Contact — Email address of the main contact for the master zone.

  • Primary Nameserver (SOA) — State of authority (SOA) record. This specifies the nameserver that is the best resource of information for this domain.

  • Serial Number — The serial number of the DNS database file. This number must be incremented each time the file is changed, so that the slave nameservers for the zone will retrieve the latest data. The Bind Configuration Tool increments this number each time the configuration changes. It can also be incremented manually by clicking the Set button next to the Serial Number value.

  • Time Settings — The Refresh, Retry, Expire, and Minimum TTL (Time to Live) values that are stored in the DNS database file. All values are in seconds.

  • Records — Add, edit, and delete record resources of type Host, Alias, and Name server.

Figure 21-2. Adding a Forward Master Zone

A Primary Nameserver (SOA) must be specified, and at least one nameserver record must be specified by clicking the Add button in the Records section.

After configuring the Forward Master Zone, click OK to return to the main window as shown in Figure 21-1. From the pulldown menu, click Save to write the /etc/named.conf configuration file, write all the individual zone files in the /var/named directory, and have the daemon reload the configuration files.

The configuration creates an entry similar to the following in /etc/named.conf:

zone  "forward.example.com" { 
type master;
file "forward.example.com.zone";
};

It also creates the file /var/named/forward.example.com.zone with the following information:

$TTL 86400
@ IN SOA ns.example.com. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)


IN NS 192.168.1.1.


21.2. Adding a Reverse Master Zone

To add a reverse master zone, click the New button and select Reverse Master Zone. Enter the first three octets of the IP address range that you want to configure. For example, if you are configuring the IP address range 192.168.10.0/255.255.255.0, enter 192.168.10 in the IP Address (first 3 Octets) text area.

A new window will appear, as shown in Figure 21-3, with the following options:

  1. IP Address — The first three octets that you just entered in the previous window.

  2. Reverse IP Address — Non-editable. Pre-populated based on the IP Address entered.

  3. Contact —Email address of the main contact for the master zone.

  4. File Name — File name of DNS database file in the /var/named directory.

  5. Primary Nameserver (SOA) — State of authority (SOA) record. This specifies the nameserver that is the best resource of information for this domain.

  6. Serial Number — The serial number of the DNS database file. This number must be incremented each time the file is changed, so that the slave nameservers for the zone will retrieve the latest data. The Bind Configuration Tool increments this number each time the configuration changes. It can also be incremented manually by clicking the Set button next to the Serial Number value.

  7. Time Settings — The Refresh, Retry, Expire, and Minimum TTL (Time to Live) values that are stored in the DNS database file.

  8. Nameservers — Add, edit, and delete name servers for the reverse master zone. At least one nameserver is required.

  9. Reverse Address Table — List of IP addresses within the reverse master zone and their hostnames. For example, for the reverse master zone 192.168.10, you can add 192.168.10.1 in the Reverse Address Table with the hostname one.example.com. The hostname must end with a period (.) to specify that it is a full hostname.

Figure 21-3. Adding a Reverse Master Zone

A Primary Nameserver (SOA) must be specified, and at least one nameserver record must be specified by clicking the Add button in the Nameservers section.

After configuring the Reverse Master Zone, click OK to return to the main window as shown in Figure 21-1. From the pulldown menu, click Save to write the /etc/named.conf configuration file, write all the individual zone files in the /var/named directory, and have the daemon reload the configuration files.

The configuration creates an entry similar to the following in /etc/named.conf:

zone  "10.168.192.in-addr.arpa" {
type master;
file "10.168.192.in-addr.arpa.zone";
};

It also creates the file /var/named/10.168.192.in-addr.arpa.zone with the following information:

$TTL 86400
@ IN SOA ns.example.com. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttk
)


@ IN NS ns2.example.com.

1 IN PTR one.example.com.
2 IN PTR two.example.com.

Berlangganan info dari kami silahkan masukan email anda:

0 Response to "Setting DNS Server dengan BIND di Redhat 9"

Posting Komentar