# BIND
# DNS Master/Slave-Server konfigurieren
This article is all about configuring DNS in master/slave mode.
Master DNS contains the zone files for all the domains for which it is authoritative. This zone information will be transfered to the slave machine when „named“ is started.
Here we need two machines with BIND rpm installed; one to be kept as master and the other to be kept as slave. In this example I use 192.168.1.1 as master and 192.168.1.2 as slave. Also, here I take 192.168.1.3 as the machine where I host my domain and mail.
Do the following in master.
1\. Login as root.
2\. Find out the path to the named configuration file.Usually it will be /etc/named.conf.
3\. Edit the conf file.
4\. Give the following entries in it.
```
$TTL 86400
@ IN SOA localhost master.domain.com. (
2007110901 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day
IN NS 192.168.1.1
IN NS 192.168.1.2
IN MX 10 mail
IN A 192.168.1.3
mail IN A 192.168.1.3
www IN A 192.168.1.3
```
5\) restart named
```
zone "domain.com" IN {
type slave;
masters {
192.168.1.1
};
file "/var/named/doamin.com.db";
};
```
4\. restart named.
named will read the conf file and will listen for the master. The master will transfer the zone information to slave and the file will be stored in „/var/named/domain.com.db“.
Thus once the zone information is passed to the slave, it is done. You have configured DNS in master-slave mode.
# DNS-Cache leeren für eine bestimmte Domain
Bekannterweise kann man mit
```
rndc flush domain1.tld domain2.tld
```
kann man den Flush aber auch auf bestimmte Domains beschränken.