Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To run BIND9 as an authoritative DNS server on Ubuntu, install the bind9 package, define your zones in /etc/bind/named.conf.local, create and validate each zone file, restart bind9.service, and test with dig. Public resolution also requires your registrar or parent zone to delegate the domain to nameserver addresses you control; configuring BIND alone does not change that delegation.

What an authoritative BIND server does

An authoritative server is the source of truth for a DNS zone. A primary (also called master) BIND server reads the zone data from a local file and answers with the records published for that zone. It is different from a recursive resolver, which looks up answers on behalf of clients and caches them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an Internet-facing authoritative service, keep recursion disabled unless the machine has a deliberate, tightly controlled resolver role. An open recursive resolver can be abused for cache poisoning, reflection, and traffic amplification. Authoritative service normally needs to answer queries for the zones you host, while refusing recursive lookups for unrelated names.

The Ubuntu package keeps its operational configuration under /etc/bind. The normal file for locally defined zones is /etc/bind/named.conf.local; global behavior belongs in /etc/bind/named.conf.options. BIND’s configuration model allows global options settings and narrower zone-specific settings, with the narrower scope taking precedence.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Plan the deployment before editing files

Choose the nameserver identity and addresses

Decide which fully qualified names will be authoritative, such as ns.example.com., and assign stable IPv4 and, if applicable, IPv6 addresses. A nameserver name in a zone file is fully qualified when it ends with a trailing dot. Without that dot, BIND treats the name as relative to the current zone.

The examples below use documentation addresses from the reserved 192.0.2.0/24 range. Replace them with addresses actually routed to your server. Do not publish the documentation addresses for a live domain.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Confirm the parent delegation and glue requirement

Your registrar or parent DNS operator must delegate the domain to the nameservers you operate. If a nameserver is inside the domain it serves—for example, ns.example.com serving example.com—the parent also needs a glue address record so resolvers can reach it without a circular dependency. A correctly configured local zone cannot make public resolvers use your server when the parent still points elsewhere.

Decide whether you need reverse DNS

A forward zone maps names to addresses, such as www.example.com to an A record. A reverse zone maps an address back to a name with a PTR record. Reverse DNS is especially useful for mail systems, logging, access controls, and diagnostics, but the party that controls the address block must delegate the reverse zone to you. Owning a forward domain does not automatically give you authority over its reverse space.

Install BIND9 and inspect the packaged layout

  1. Install the Ubuntu package:
    sudo apt install bind9
  2. Review the files in /etc/bind. The packaged configuration includes named.conf, named.conf.options, named.conf.local, and distribution-provided zone definitions.
  3. Use /etc/bind/named.conf.options for settings that apply broadly and /etc/bind/named.conf.local for your own authoritative zone declarations. Keeping local declarations separate makes package upgrades and troubleshooting easier.

Do not replace the entire packaged configuration with a fragment copied from another system. Preserve the Ubuntu includes unless you have a specific reason to change them, and validate the complete configuration before restarting the service.

Set global behavior for an authoritative-only service

Open /etc/bind/named.conf.options and review the existing options block. The exact defaults vary by Ubuntu release, so adjust the existing block rather than blindly adding a second one. A minimal authoritative-only policy has these characteristics:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Recursion is disabled for Internet-facing authoritative service.
  • Queries for the zones you serve are permitted according to your access policy.
  • BIND listens on the addresses where clients and parent nameservers can reach it.
  • Both UDP and TCP port 53 are reachable through the host and any network firewall. DNS normally uses UDP, but TCP is required for larger responses and some protocol operations.

A representative policy fragment is:

options {
    directory "/var/cache/bind";
    recursion no;
    allow-query { any; };
};

The fragment is a pattern, not a replacement for every setting in the Ubuntu file. Restrict allow-query when the service is private, and use explicit listening addresses when the host has multiple interfaces. If the server must also provide recursion to a controlled internal network, separate that role carefully with client ACLs rather than exposing recursion to the Internet.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Declare the forward zone in named.conf.local

Add a zone statement to /etc/bind/named.conf.local. The following declares a primary zone and points BIND to its local file:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
};

type master means this server obtains the zone from the local file. The file path can be elsewhere, but using a clear path under /etc/bind for a static unsigned zone follows the Ubuntu layout. The zone name must exactly match the domain you intend to serve.

Build a forward zone file

Create /etc/bind/db.example.com with an SOA record, at least one NS record, an address record for each nameserver, and the application records clients need. A minimal working pattern is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
$TTL 604800
@   IN  SOA ns.example.com. root.example.com. (
        1       ; Serial
        604800  ; Refresh
        86400   ; Retry
        2419200 ; Expire
        604800  ; Negative Cache TTL
)
@   IN  NS  ns.example.com.
ns  IN  A   192.0.2.10
www IN  A   192.0.2.20

Replace the example names and documentation addresses with your delegated nameserver and host data. The trailing dots on ns.example.com. and root.example.com. are significant. In the SOA, the second name is the responsible mailbox written with a dot in place of the @; root.example.com. represents root@example.com.

Understand the SOA timing fields

Field Example Purpose
Serial 1 Version of the zone data. Increase it on every edit so secondaries and caches can detect a new version.
Refresh 604800 How often a secondary checks the primary for a newer serial, in seconds.
Retry 86400 How long a secondary waits before retrying after a failed refresh, in seconds.
Expire 2419200 How long a secondary may continue serving unchanged data when it cannot contact the primary, in seconds.
Negative Cache TTL 604800 How long resolvers may cache a negative answer, such as an absent name, in seconds.

The values above are the documented example values, not universal recommendations. Choose timings appropriate to how often you change the zone and how quickly an error must age out. Never reuse the same serial after changing a record; a secondary that sees an unchanged serial is entitled to keep its old data.

Add records with the correct owner names

  • @ means the zone apex, so the NS record publishes the nameserver for example.com.
  • ns is relative to the zone and becomes ns.example.com..
  • www becomes www.example.com..
  • An absolute owner or target name ends in a dot; use that form when you do not want BIND to append the zone name.

For IPv4 use an A record. Add AAAA records when the nameserver or service is reachable over IPv6, and ensure the corresponding address is actually routed. Do not publish an address that cannot receive DNS traffic; parent delegation and glue must match the reachable addresses.

Add a reverse DNS zone

Reverse DNS uses the in-addr.arpa namespace for IPv4. For a 192.168.1.0/24 network, the zone name is 1.168.192.in-addr.arpa, with the address octets reversed. Declare it in /etc/bind/named.conf.local:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
zone "1.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/db.192";
};

Create /etc/bind/db.192 and include SOA and NS records plus PTR records. In this example, the owner 20 represents 192.168.1.20:

$TTL 604800
@   IN  SOA ns.example.com. root.example.com. (
        1       ; Serial
        604800  ; Refresh
        86400   ; Retry
        2419200 ; Expire
        604800  ; Negative Cache TTL
)
@   IN  NS  ns.example.com.
20  IN  PTR www.example.com.

Increment the reverse zone’s serial independently whenever its records change. The organization that controls the address block must delegate the matching reverse zone to your nameserver; otherwise your local PTR data will not be visible to the wider Internet.

Validate configuration and zone contents before activation

Check the complete BIND syntax first, then validate each zone against its expected origin and file:

sudo named-checkconf
sudo named-checkzone example.com /etc/bind/db.example.com
sudo named-checkzone 1.168.192.in-addr.arpa /etc/bind/db.192

named-checkconf catches malformed statements, missing braces, and include errors. named-checkzone checks the records and reports the loaded serial. A successful check includes the serial you supplied and an OK result. Treat warnings as something to investigate, not as proof that the zone is ready for delegation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common validation failures include a missing trailing dot that turns an absolute name into a relative one, an owner name outside the intended origin, duplicate records, an invalid SOA, and a file path that does not match the declaration. Correct the file and rerun the checks before touching the service.

Restart BIND and verify service health

  1. Restart the service after validation:
    sudo systemctl restart bind9.service
  2. Inspect its state:
    sudo systemctl status bind9.service
  3. If the service fails, read the status output and system log for the first configuration or permission error. Do not repeatedly restart while an invalid zone file remains in place.

A successful service start proves that BIND accepted its configuration, but it does not prove that the parent delegates your domain, that a firewall permits DNS traffic, or that every record returns the intended value.

Test authoritative answers with dig

Query the server directly rather than relying on a recursive resolver that might return cached data:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
dig @192.0.2.10 example.com SOA

dig @192.0.2.10 www.example.com A +norecurse

dig @192.0.2.10 -x 192.0.2.20

For a forward lookup, confirm that the answer contains the expected record and that the response header includes the authoritative-answer (aa) flag. The SOA query confirms the zone apex and serial. The reverse query should return the PTR target that matches the reverse zone.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the server’s actual address in place of 192.0.2.10. If you query a different resolver, it may legitimately answer from cache or return a delegation result rather than your newly edited data. After changing a record, query the primary directly first, then test through a resolver once propagation and TTL behavior are relevant.

Publish the delegation at the registrar or parent

For public service, configure the parent domain with NS records naming your authoritative servers and provide glue addresses when a nameserver name is below the delegated domain. The parent must point to every authoritative server you intend clients to use. Verify the delegation from outside your network after the parent publishes it.

Local tests can all pass while public lookups fail when the parent still lists old nameservers, glue points to the wrong address, or UDP/TCP port 53 is blocked. Delegation changes are separate from editing the zone file, so treat them as two distinct change steps.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Add a secondary server for availability

A single primary is simpler but creates a single service failure point. Ubuntu recommends operating a secondary server for availability. The secondary obtains a copy through a zone transfer and can continue answering when the primary is unavailable, subject to the SOA expiration policy.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Restrict transfers on the primary

Add an allow-transfer clause to each primary zone, limiting transfers to the secondary’s address:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
    allow-transfer { SECONDARY_IP; };
};

Replace SECONDARY_IP with the secondary’s real address. Do not leave transfers open to arbitrary clients. After changing the declaration, validate the configuration and restart bind9.service on the primary.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Configure the secondary

On the secondary, declare the same zone as a slave and identify the primary address. The exact file path and service layout should follow the secondary’s Ubuntu configuration, but the essential relationship is that the secondary pulls the zone from the primary rather than editing an independent copy. Ensure the primary can reach the secondary and that the secondary can reach the primary over the DNS and transfer paths.

When you edit a primary zone, increment its SOA serial. The secondary compares serials during refresh and transfers the newer version. If the serial does not change, a syntactically valid edit may never propagate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Primary versus primary-plus-secondary

Design Availability Transfer security Operational complexity Best fit
One primary Service stops if the host or network path fails. No zone-transfer exposure, but the server itself remains a single target. Lowest; one set of files and checks. Lab environments, private zones, or situations where downtime is acceptable.
Primary plus secondary Another server can answer during a primary outage, subject to SOA expiration and delegation. Requires an address-restricted allow-transfer policy and a protected transfer path. Higher; maintain serials, transfer access, monitoring, and two hosts. Public domains and services that need resilience.

Plan DNSSEC after unsigned service works

DNSSEC is a follow-on hardening step, not a substitute for a correct unsigned zone. Ubuntu defines it as “a set of security extensions to DNS which allow DNS data to be verified for authenticity and integrity.” Signing adds records such as DNSKEY, RRSIG, and the parent-facing DS record.

Ubuntu’s DNSSEC guidance starts from an existing authoritative zone and notes that signing requires a writable location such as /var/lib/bind. Static configuration files under /etc/bind are commonly protected from routine writes, so plan ownership, permissions, key storage, and backup before enabling automatic signing. After signing, validate the resulting zone and publish the DS information through the parent according to its process.

Do not begin key management while basic authority is still unverified. First establish repeatable syntax checks, direct SOA and record queries, delegation checks, and a tested recovery procedure; then introduce signing and monitor validation status.

Troubleshoot the failure that matches the symptom

named-checkconf reports an error

  • Read the reported file and line number first; a missing semicolon or brace often causes later lines to look invalid.
  • Check that each zone declaration uses the exact quoted origin and an existing file path.
  • Ensure every configuration fragment is included only once and that braces are balanced.

named-checkzone rejects the zone

  • Verify the first argument is the zone origin, not the file name.
  • Check SOA punctuation, parentheses, numeric timing fields, and the serial.
  • Add trailing dots to fully qualified names in SOA, NS, PTR, and target fields where appropriate.
  • Confirm that relative names such as www are intentionally relative to the declared zone.

The service will not start after an edit

Run both validation commands again, then inspect systemctl status bind9.service. A syntactically valid configuration can still fail if BIND cannot read the zone file. Check the file path, ownership, mode, and parent-directory permissions, especially if you moved a file outside the packaged directories.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

dig returns no authoritative answer

  • Confirm you queried the correct server address with the @server syntax.
  • Look for the aa flag and compare the returned SOA serial with the file you edited.
  • Check that the zone is declared as type master on this host and that the queried name belongs to that origin.
  • Ensure UDP and TCP port 53 are allowed through local and upstream firewalls.

Public lookups still show old or different data

Query the primary directly, then inspect parent delegation and glue. If the primary has the new serial but a secondary does not, check its transfer permission, reachability, and refresh logs. If recursive resolvers still show the old value, the previous TTL may not have expired.

A reverse lookup returns NXDOMAIN or the wrong name

Make sure the reversed octets select the correct in-addr.arpa zone, the PTR owner matches the address, and the address-block operator delegates that reverse zone to your server. A forward A record does not automatically create a PTR record.

Operational checklist for every change

  • Edit the intended zone file under the path declared in named.conf.local.
  • Increment that zone’s SOA serial.
  • Run sudo named-checkconf.
  • Run sudo named-checkzone for every changed zone.
  • Restart bind9.service only after validation succeeds.
  • Check service status and query the primary with dig.
  • For a public zone, verify parent delegation, glue, and both DNS transports.
  • If a secondary exists, confirm that it has transferred the new serial.
  • Keep backups of unsigned zone data and, once DNSSEC is enabled, protect and back up signing keys separately.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.