When you're running a BIND DNS server with complex configurations like split-horizon DNS (using views
in named.conf
), finding a proper web interface becomes surprisingly difficult. Standard interfaces often fail to properly handle:
- Multiple view declarations in named.conf
- Zone files distributed across different views
- ACLs and match-clients directives
- View-specific options and forwarding
From my own implementation (running BIND 9.16 on Ubuntu Server 20.04), here's what I found with popular options:
# Example named.conf views structure that causes issues:
view "internal" {
match-clients { 192.168.1.0/24; };
recursion yes;
zone "example.com" {
type master;
file "/etc/bind/internal/example.com.zone";
};
};
view "external" {
match-clients { any; };
recursion no;
zone "example.com" {
type master;
file "/etc/bind/external/example.com.zone";
};
};
While not perfect, WebMin's BIND module offers the most comprehensive support for views:
- Install via
wget https://prdownloads.sourceforge.net/webadmin/webmin_2.101_all.deb
- Navigate to Servers → BIND DNS Server
- Use the "Views" tab to manage different configurations
The key advantage is direct named.conf parsing rather than using an abstraction layer. You can manually edit view sections while still using the UI for zone management.
For those preferring a more modern interface, PowerDNS Admin can work with BIND as a backend:
# /etc/powerdns-admin/config.py configuration:
BIND_CONFIG_FILE = '/etc/bind/named.conf'
BIND_STATS_URL = 'http://localhost:8053'
BIND_RNDC_CONFIG = '/etc/bind/rndc.conf'
This setup allows view management through the PowerDNS Admin interface while still using BIND's powerful view functionality underneath.
For advanced users, consider building a lightweight management layer with Python/Flask:
from flask import Flask
import dns.query
import dns.update
import dns.zone
app = Flask(__name__)
@app.route('/zone/add//', methods=['POST'])
def add_zone(view_name, zone_name):
# Logic to modify named.conf and create zone files
return f"Zone {zone_name} added to view {view_name}"
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
This provides complete control over view management while offering web accessibility.
Managing BIND DNS servers can be complex, especially when dealing with multiple views in named.conf
. While command-line tools like rndc
work, web interfaces provide better usability. Here's an exploration of solutions supporting BIND views.
WebMin has a mature BIND module that handles views:
# Sample WebMin BIND view configuration
view "internal" {
match-clients { 10.0.0.0/8; };
zone "example.com" {
type master;
file "internal.example.com.zone";
};
};
Pros:
- Direct
named.conf
editing with syntax highlighting - View creation wizard
- Zone template management
Cons:
- UI feels dated
- No modern REST API
Originally for PowerDNS, but works with BIND backend:
# pdns_admin/config.py excerpt
BIND_CONFIG = {
'views_enabled': True,
'default_view': 'external',
'allow_view_management': True
}
Key features:
- Multi-user with RBAC
- Zone versioning
- API-first design
The open-source BIND9-Admin project provides a foundation:
// View management snippet
$view = new BindView();
$view->setName('dmz')
->setMatchClients(['192.168.1.0/24'])
->addZone($zone);
$bindConfig->addView($view);
Requires PHP but offers:
- Modern web interface
- BIND 9.16+ support
- Zone templating
For maximum control, integrate with libbind:
// C example using libbind
isc_result_t result;
dns_view_t *view;
result = dns_view_create(mctx, "internal", &view);
dns_view_setmatchclients(view, "10.0.0.0/8");
Solution | View Support | API | Multi-user |
---|---|---|---|
WebMin | Full | No | Basic |
PowerDNS Admin | Partial | REST | Yes |
BIND9-Admin | Full | Custom | Yes |