- Installation service DNS (bind)
- # yum install bind
- Test the service
- # service named start
- (If it is correct you will see the ok from the stopping and another form the starting)
- # service named start
- Open ports for DNS
- #iptables –A INPUT –p tcp –dport 53 –j ACCEPT
- #iptables –A INPUT –p udp –dport 53 –j ACCEPT
- Set Booleans. If you are using Oracle Linux server take this point in consideration.
- Check before the state.
- #getsebool –a | grep named
(You would find off)
- #getsebool –a | grep named
- Set Booleans.
- #setsebool named_write_master_zones on
(you will just change named_write_master_zones).
- #setsebool named_write_master_zones on
- Check before the state.
- Edit /etc/named.conf
- # vi /etc/named.conf
- (You should make some changes in this file)
- Add the ip of your machine where it is listening.
- Add any in allow-query if you want that response to everyone.
- Other options:
- Add specific ip
- Add wildcards ( 192.168.0.0/24)
- Other options:
- ADD THE ZONE
- Zone “name of zone” {
type master;
file “var/named/name of the file”;
allow-update { none; };
};
- Zone “name of zone” {
- Create & Edit /var/named/(file of the zone
- #cd /var/named
- #vi db.va.com (the name of the file that we wrote in /etc/named.conf
- # add the next parameters.
- Restart the service