Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bind9 local dns server configuration (PoC)

NotificationsYou must be signed in to change notification settings

sukhoy94/dns-bind9

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository provides a Dockerized BIND9 setup for local DNS resolution, which can be particularly useful for developers looking to simulate production DNS environments locally or for internal network purposes.

Features:

Dockerized setup for easy deployment.Pre-configured BIND9 for dusha-project.local.

dusha-project.local.

dusha-project.local. is a sample domain which I'm using. The goal is to configure dns in suchway that when you enteringhttp://dusha-project.local in browser - it should point tothe localhost 80 port. And instead of using /etc/hosts like:

127.0.0.1 dusha-project.local

I want to achieve same results using bind9 dockerized.

Prerequisites:

  • Docker
  • Docker Compose

Getting Started:

  1. Clone the repository:
git clone https://github.com/sukhoy94/dns-bind9.git
  1. Navigate to the repository folder:
cd dns-bind9
  1. Build and Start the Docker container:
docker-compose up -d
  1. Test the DNS resolution:
dig @your_container_ip dusha-project.local

Configuration:

Configuration files for BIND9 are located in the bind9-config directory. You can modify these files as per your requirements:

  • named.conf.local - Defines the zones.
  • db.local.template - Contains the DNS records for the defined zone.

Using on Host

To configure your system to use this DNS server, you'll need to add theDNS server's IP to the /etc/resolv.conf file on your host.

  1. Open the /etc/resolv.conf file in an editor:
sudo nano /etc/resolv.conf
  1. Add the IP of your Docker container at the top of the list of DNS servers:
nameserver your_container_ip
  1. Save and close the file.

Now, any DNS query made from your system will first be routed to the DNS server running inside the Docker container.Note: In some systems, the /etc/resolv.conf file might get regenerated on reboot or when network settings change. If you notice that your changes get removed, you might need additional configuration to make them persistent.

Contributing:

Feel free to fork, improve, and submit pull requests.

License:

This project is open-sourced software licensed under the MIT license.

About

bind9 local dns server configuration (PoC)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp