diff --git a/website/source/docs/guides/forwarding.html.markdown b/website/source/docs/guides/forwarding.html.markdown index 1f9b637a29..2360229542 100644 --- a/website/source/docs/guides/forwarding.html.markdown +++ b/website/source/docs/guides/forwarding.html.markdown @@ -4,16 +4,19 @@ page_title: "Forwarding" sidebar_current: "docs-guides-forwarding" --- -# Forwarding DNS queries from Bind To Consul +# Forwarding DNS -In order to not have to run Consul as root and bind to port 53 it's best if -it's paired with Bind. +By default DNS is served from port 53 which requires root privileges. +Instead of running Consul as root, it is possible to instead run Bind +and forward queries to Consul as appropriate. -In this example, Bind and Consul are running on the same machine for simplicity but you should be able to separate them. +In this example, Bind and Consul are running on the same machine for +simplicity but this is not required. -### DNSSEC +### Bind Setup -First, you have to disable DNSSEC so that Consul and Bind can communicate +First, you have to disable DNSSEC so that Consul and Bind can communicate. +This is an example configuration: options { listen-on port 53 { 127.0.0.1; }; @@ -46,15 +49,14 @@ Then we set up a zone for our Consul managed records in consul.conf: forwarders { 127.0.0.1 port 8600; }; }; -## Complete the Setup - -Once those files are changed, restarted named (on RHEL this is just 'system named restart') and you should be done. +Here we assume Consul is running with default settings, and is serving +DNS on port 8600. ### Testing First, perform a DNS query against Consul directly to be sure that the record exists: - [root@localhost ~]# dig @localhost -p 8600 master.redis.service.dc-1.consul. A + [root@localhost ~]# dig @localhost -p 8600 master.redis.service.dc-1.consul. A ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.32.amzn1 <<>> @localhost master.redis.service.dc-1.consul. A ; (1 server found) @@ -76,7 +78,7 @@ First, perform a DNS query against Consul directly to be sure that the record ex Then run the same query against your Bind instance and make sure you get a result: - [root@localhost ~]# dig @localhost -p 53 master.redis.service.dc-1.consul. A + [root@localhost ~]# dig @localhost -p 53 master.redis.service.dc-1.consul. A ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.32.amzn1 <<>> @localhost master.redis.service.dc-1.consul. A ; (1 server found) @@ -98,8 +100,7 @@ Then run the same query against your Bind instance and make sure you get a resul ### Troubleshooting -If you don't get an answer from Bind but you do get an answer from Consul then your best bet is to turn on the query log -to see what's going on +If you don't get an answer from Bind but you do get an answer from Consul then your best bet is to turn on the query log to see what's going on: [root@localhost ~]# rndc querylog [root@localhost ~]# tail -f /var/log/messages @@ -109,6 +110,5 @@ In there if you see errors like this: error (no valid RRSIG) resolving error (no valid DS) resolving -Then DNSSEC is not disabled properly. If you see errors about network connections then verify that there are no firewall or -routing problems between the servers running Bind and Consul +Then DNSSEC is not disabled properly. If you see errors about network connections then verify that there are no firewall or routing problems between the servers running Bind and Consul diff --git a/website/source/docs/guides/index.html.markdown b/website/source/docs/guides/index.html.markdown index 9de69a527a..e8144100b6 100644 --- a/website/source/docs/guides/index.html.markdown +++ b/website/source/docs/guides/index.html.markdown @@ -15,11 +15,11 @@ The following guides are available: * [Bootstrapping](/docs/guides/bootstrapping.html) - This guide covers bootstrapping a new datacenter. This covers safely adding the initial Consul servers. + * [DNS Forwarding](/docs/guides/forwarding.html) - Forward DNS queries from Bind to Consul + * [External Services](/docs/guides/external.html) - This guide covers registering an external service. This allows using 3rd party services within the Consul framework. - * [Forwarding](/docs/guides/forwarding.html) DNS queries from Bind to Consul - * TODO: Adding and removing servers * TODO: Joining datacenters diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 0b8ca585ba..15d7e773a4 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -124,9 +124,13 @@ Bootstrapping +