Advanced usage of Bind
Introduction
Bind is good, but sometimes it becomes a bit complex. Especially when you want to manage DNS servers like providers do. Here are some tips I found to improve the beast.
Force zone updates
Method 1
You may quickly need to update your zones without waiting for Bind to do it itself (see SOA, refresh, etc... for each zone). For this, you must freeze Bind updates on the zones in question:
- deimos.fr: the zone
- internalview: the view in which the zone is located
You can remove "in
Now, make the changes you want on your zone file.
Once finished, run these commands:
- reload: reload configuration file and zones.
- thaw: Enable updates to a frozen dynamic zone and reload it.
If all goes well, you'll see something like this in the logs:
Method 2
Here is a second method, to do the same thing:
Round Robin: Load balancer
First of all, you should know that you can only load balance with A records (except apparently for BIND v4 where you can do it with CNAME). Here's an example of how to manage a domain configuration:
- 60: corresponds to the TTL, and it is very important because it will decide when to switch
- x.x.x.x: IP addresses of servers. Unfortunately, you cannot use DNS names.
You can also choose the type of load balancing among these:
- fixed - records are returned in the order they are defined in the zone file
- random - records are returned in a random order
- cyclic - records are returned in a round-robin fashion
To do this, add this type of lines and adapt according to your needs:
For more information, see the reference sites below.
FAQ
journal rollforward failed: journal out of sync with zone
If you have this error, it's due to a zone synchronization problem. Look in your logs for the zone(s) causing problems, then delete the sync file:
All that's left is to reload or restart your bind and the sync will restart correctly.