From 09735ec72fbb92188fa3f71d232888605eaa2403 Mon Sep 17 00:00:00 2001 From: Lens0021 / Leslie Date: Tue, 8 Oct 2024 03:52:46 +0900 Subject: [PATCH] docs: Add missing `&&` in DNS forwading tutorial (#21804) Add missing `&&` to iptables command. The original commands fail when being directly pasted into a shell. --- .../content/docs/services/discovery/dns-forwarding/enable.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/docs/services/discovery/dns-forwarding/enable.mdx b/website/content/docs/services/discovery/dns-forwarding/enable.mdx index b165c2c8fa..e7def0b4bc 100644 --- a/website/content/docs/services/discovery/dns-forwarding/enable.mdx +++ b/website/content/docs/services/discovery/dns-forwarding/enable.mdx @@ -66,7 +66,7 @@ When using the Consul Docker image, add the following to the environment to allo To avoid running Consul as a privileged user, the following `iptables` commands are sufficient to map port `53` to `8600` and redirect DNS queries to Consul. ```shell-session -# iptables --table nat --append OUTPUT --destination localhost --protocol udp --match udp --dport 53 --jump REDIRECT --to-ports 8600 \ +# iptables --table nat --append OUTPUT --destination localhost --protocol udp --match udp --dport 53 --jump REDIRECT --to-ports 8600 && \ iptables --table nat --append OUTPUT --destination localhost --protocol tcp --match tcp --dport 53 --jump REDIRECT --to-ports 8600 ``` @@ -417,4 +417,4 @@ This instructions on this page helped you configure your node to forward DNS req To learn more on how to query Consul DNS once forwarding is enabled, refer to [DNS forwarding workflow](/consul/docs/services/discovery/dns-forwarding#workflow). -For more information on other DNS features and configurations available in Consul, refer to [DNS usage overview](/consul/docs/services/discovery/dns-overview). \ No newline at end of file +For more information on other DNS features and configurations available in Consul, refer to [DNS usage overview](/consul/docs/services/discovery/dns-overview).