Skip to content

mcchae/docker-dns-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNS 서버 for docker container

이 컨테이너는 bind 서버를 이용하여 DNS 서비스를 구성합니다.

사용법

docker-compose 설정 파일로 다음과 같이 설정합니다.

version: '2'

services:
  bind:
#   restart: always
    image: mcchae/dns-server
    ports:
    - "53:53/udp"
    - "53:53/tcp"
    - "10000:10000/tcp"
    volumes:
    - ${PWD}/dhv/bind:/data

주의할 점

docker 디폴트 bridge 모드로 사용할 경우, 호스트에서 접속해서 정보를 가져오려고 하면, 안되는 경우가 있는데, 이 경우에는

dhv/bind/bind/etc/named.conf.options 파일에

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

라는 allow all 섹션을 추가해 줍니다.

테스트

$ dig @localhost google.com

About

docker container for DNS service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published