]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: unify documented DoH port usage to 443
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 18 Apr 2019 13:12:08 +0000 (15:12 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Thu, 18 Apr 2019 15:09:57 +0000 (17:09 +0200)
daemon/bindings/net.rst
modules/http/README.doh.rst
modules/http/README.rst
systemd/kresd-doh.socket.d/all-interfaces.conf
systemd/kresd-doh.socket.d/specific-interfaces.conf

index 696fe6ed541e0db8cea09a75f1bffa87a2f794d0..458683ef0eb7fd6eb571a71279078268bb202e8d 100644 (file)
@@ -75,8 +75,6 @@ TLS connections.
    [Socket]
    ListenStream=192.0.2.115:853
 
-.. _kresd-doh-socket-configuration:
-
 To configure socket for DNS-over-HTTPS, make sure you have
 ``kresd-doh.socket`` installed (it might be part of a separate
 ``knot-resolver-module-http`` package).  Then, you can configure its network
@@ -147,6 +145,7 @@ configured in the config file.
        net.listen('::1')
        net.listen(net.lo, 5353)
        net.listen({net.eth0, '127.0.0.1'}, 53853, { kind = 'tls' })
+       net.listen('::', 443, { kind = 'doh' }) -- see http module
        net.listen('::', 8453, { kind = 'webmgmt' }) -- see http module
 
 .. function:: net.close(address, [port])
index fcd25762c1cfc4970776f6213b69e059df2e0415..beb9657ab74e5dabb18d3000deab911df43dbb03 100644 (file)
@@ -46,12 +46,12 @@ This integrated DoH server has following properties:
 
 :ref:`Example configuration <mod-http-example>` is part of examples for generic
 HTTP module. After configuring your endpoint you can reach the DoH endpoint using
-URL ``https://your.resolver.hostname.example:44353/doh``, done!
+URL ``https://your.resolver.hostname.example/doh``, done!
 
 .. code-block:: bash
 
        # query for www.knot-resolver.cz AAAA
-       $ curl -k https://your.resolver.hostname.example:44353/doh?dns=l1sBAAABAAAAAAAAA3d3dw1rbm90LXJlc29sdmVyAmN6AAAcAAE
+       $ curl -k https://your.resolver.hostname.example/doh?dns=l1sBAAABAAAAAAAAA3d3dw1rbm90LXJlc29sdmVyAmN6AAAcAAE
 
 Please see section :ref:`mod-http-tls` for further details about TLS configuration.
 
index 7c82d893fab1d3254922f30f4f1d3b8e39f74cff..4c50232eb19c1e69f85667ed0cbe435c9adcba50 100644 (file)
@@ -43,46 +43,20 @@ Example configuration
 Here we show how to configure web management API on loopback interface
 on port 8453, and how to expose :ref:`mod-http-doh` endpoint on public IP addresses.
 
-Modern distributions use systemd socket activation and thus IP addresses of endpoints
-are configured using systemd. (Beware, CentOS 7 has too old version of systemd and
-you have to configure IP addresses in Knot Resolver's configuration file instead.)
+For network configuration when using systemd socket activation, refer to
+:ref:`network-configuration`. Please note ``kresd-webmgmt.socket`` is
+configured to listen on loopack interface on port 8453 by default and requires
+no further configurtion.
+
+If your distribution isn't using systemd socket activation (e.g. CentOS 7 or
+macOS), use ``net.listen()`` and use kind ``doh`` for DNS-over-HTTPS and
+``webmgmt`` for web management API.
 
 .. warning:: Make sure you read section :ref:`mod-http-doh`
              before copy&pasting this snippet.
 
-.. code-block:: bash
-
-        # IP address configuration for modern systems
-        # with systemd socket activation (not CentOS 7)
-
-        # configuring DoH on public IP addresses, port 44353
-        $ vim /etc/systemd/system/kresd-doh.socket.d/override.conf
-        # /etc/systemd/system/kresd-doh.socket.d/override.conf
-        [Socket]
-        ListenStream=
-        ListenStream=192.0.2.1:44353
-        ListenStream=[2001:db8::1]:44353
-
-        # configuring web management on loopback port 8453
-        $ vim /etc/systemd/system/kresd-webmgmt.socket.d/override.conf
-        # /etc/systemd/system/kresd-webmgmt.socket.d/override.conf
-        [Socket]
-        ListenStream=
-        ListenStream=127.0.0.1:8453
-
-
 .. code-block:: lua
 
-        -- use net.listen() only on old systems like CentOS 7
-        -- which lack proper support for systemd socket activation
-
-        -- expose management interface on loopback
-        -- net.listen('127.0.0.1', '8453', { kind = 'webmgmt' })
-
-        -- expose DoH on public interfaces
-        -- net.listen('192.0.2.1', '44353', { kind = 'doh' })
-        -- net.listen('2001:db8::1', '44353', { kind = 'doh' })
-
         -- load HTTP module with defaults (self-signed TLS cert)
         modules.load('http')
         -- optionally load geoIP database for server map
index 3a02aaf5f79520934106a324fc1ebbcb18c9cd1a..63619099469328a6412f2fc8cfde861ada586f7e 100644 (file)
@@ -8,4 +8,4 @@
 
 [Socket]
 ListenStream=
-ListenStream=[::]:44353
+ListenStream=[::]:443
index d4dab85e84489b51ca7cfdd1cd74c792a85271af..1108d3b293250c3743386327e36a0a5ac95c911a 100644 (file)
@@ -5,5 +5,5 @@
 # ListenStream can be added multiple times.
 
 [Socket]
-ListenStream=192.0.2.115:44353
-ListenStream=[2001:db8::115]:44353
+ListenStream=192.0.2.115:443
+ListenStream=[2001:db8::115]:443