Skip to content

Instantly share code, notes, and snippets.

@zembutsu
Created June 18, 2014 04:42
Show Gist options
  • Save zembutsu/5ce59997703353d09298 to your computer and use it in GitHub Desktop.
Save zembutsu/5ce59997703353d09298 to your computer and use it in GitHub Desktop.
Consulの名前解決にDNS Forwardingを使う方法 ref: http://qiita.com/zembutsu/items/ea05fbeff06cafb5ec2e
$ dig @sakura1.pocketstudio.net -p 8600 web.service.sakura.consul
(略)
;; QUESTION SECTION:
;web.service.sakura.consul. IN A
;; ANSWER SECTION:
web.service.sakura.consul. 30 IN A 192.168.39.11
web.service.sakura.consul. 30 IN A 192.168.39.13
$ dig @127.0.0.1 web.service.sakura.consul
(略)
;; QUESTION SECTION:
;web.service.sakura.consul. IN A
;; ANSWER SECTION:
web.service.sakura.consul. 30 IN A 192.168.39.11
web.service.sakura.consul. 30 IN A 192.168.39.13
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-transfer { 153.121.46.159; };
allow-query { localhost; };
recursion yes;
dnssec-enable no;
dnssec-validation no;
};
include "/etc/named/consul.conf";
zone "consul" IN {
type forward;
forward only;
forwarders { 127.0.0.1 port 8600; };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment