From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 26 22:07:33 2023 Received: (at submit) by debbugs.gnu.org; 27 Jul 2023 02:07:33 +0000 Received: from localhost ([127.0.0.1]:40423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOqPc-0008Pa-NI for submit@debbugs.gnu.org; Wed, 26 Jul 2023 22:07:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOqPZ-0008PL-75 for submit@debbugs.gnu.org; Wed, 26 Jul 2023 22:07:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOqPT-000849-M0 for guix-patches@gnu.org; Wed, 26 Jul 2023 22:07:23 -0400 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOqPR-0002WT-QI for guix-patches@gnu.org; Wed, 26 Jul 2023 22:07:23 -0400 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-4039a42467fso2704991cf.3 for ; Wed, 26 Jul 2023 19:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690423640; x=1691028440; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=aoHCc6oi4+bF64Itm71sY1QgaYeldWHb1Ke9NuHK9aw=; b=bgC8+Q/g6v+hwciWjbKNCNWP9gJNEj09H9QMMSyd4uqvbIWDjalTxP6d4nS+lezAc8 mEu+BZ3rM57aGr05rw/hUUAxpVP9NiOaIg1Z4nVEkhuG40q1wil7b3ltlJztBpqr0Gi1 MuiYCCOMxhZg64zXKKeUYzHLQZwSn/P4orx31PD1qhOZ+kqdyqdZ7fP2B3aDIy7mbRCY yuNfHfFd/iZwQq3OokL2fOxhcA7FhuSSkFrhMBMN8eTWHBc00gC25vH3QRNg5rXf1k71 BkUdLZFeoHP20uR+M7gAfEdKL9gxxgK5/TAKnEfGCFNqoVyQF3MrB9474usAkE9KcEkc 1OjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690423640; x=1691028440; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aoHCc6oi4+bF64Itm71sY1QgaYeldWHb1Ke9NuHK9aw=; b=cypm11+vWRm4NnL01SCrP2jIKd25JXcVexmb4rQSRd6RWFJyt4ZihYxUgNAs7Stywm DbPGOhoPle/6fZ6OaOW9bohRrBgfYG4IIQxrizGgP3oXInOTbmwHT3bceyV531USDMJe QwHKLihAATFH6N4uiSfThwq948q2TrZ1kjURjlmFDhjKiLvCTolpmV8rja7oraYz/C/v 1t8xipP5bY1zhoOOyMJzHtnScgvjNKmF77Ts+EdjfcD+p0qquzCkke6zbF+wHnhQLOXL siYYRb3ie2SWyLtwKWlwFmaZy4nLRkw40GIJOsWZRtlcpQYUFC3frIAsPEWVOb3iGVGU SYfA== X-Gm-Message-State: ABy/qLaiLvQAxAat/qlkIHv7Ecb5y+NK9D1hkVKRlxXkQt531rHelqRi JyYlr0lRW07hOF9AEybGxHoaX5daxY4uDQ== X-Google-Smtp-Source: APBJJlGS8dDY8/6r0yiP/DOu2z9U1+v2Q38hVff0ILmkH2gcZKstNb9V+Mn8i/mV+RUzSaurXiiLsA== X-Received: by 2002:ac8:7dcf:0:b0:404:a649:879c with SMTP id c15-20020ac87dcf000000b00404a649879cmr4246111qte.49.1690423640206; Wed, 26 Jul 2023 19:07:20 -0700 (PDT) Received: from localhost.localdomain (dsl-10-141-65.b2b2c.ca. [72.10.141.65]) by smtp.gmail.com with ESMTPSA id y25-20020ac87c99000000b00403b3156f18sm114805qtv.8.2023.07.26.19.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 19:07:19 -0700 (PDT) From: Maxim Cournoyer To: guix-patches@gnu.org, maxim.cournoyer@gmail.com Subject: [PATCH] doc: cookbook: Document a dynamic DNS update mcron job. Date: Wed, 26 Jul 2023 22:04:40 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.7 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix-cookbook.texi (System Configuration) : New subsection. --- doc/guix-cookbook.texi | 56 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 [...] Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (maxim.cournoyer[at]gmail.com) 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: duckdns.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix-cookbook.texi (System Configuration) : New subsection. --- doc/guix-cookbook.texi | 56 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.7 URIBL_BLACK Contains an URL listed in the URIBL blacklist [URIs: duckdns.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (maxim.cournoyer[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * doc/guix-cookbook.texi (System Configuration) : New subsection. --- doc/guix-cookbook.texi | 56 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 2e58c6c795..8e069f921e 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1460,9 +1460,10 @@ System Configuration * Customizing the Kernel:: Creating and using a custom Linux kernel on Guix System. * Guix System Image API:: Customizing images to target specific platforms. * Using security keys:: How to use security keys with Guix System. +* Dynamic DNS mcron job:: Job to update the IP address behind a DuckDNS host name. * Connecting to Wireguard VPN:: Connecting to a Wireguard VPN. * Customizing a Window Manager:: Handle customization of a Window manager on Guix System. -* Running Guix on a Linode Server:: Running Guix on a Linode Server +* Running Guix on a Linode Server:: Running Guix on a Linode Server. * Setting up a bind mount:: Setting up a bind mount in the file-systems definition. * Getting substitutes from Tor:: Configuring Guix daemon to get substitutes through Tor. * Setting up NGINX with Lua:: Configuring NGINX web-server to load Lua modules. @@ -2022,6 +2023,59 @@ Using security keys ready to be used with applications supporting two-factor authentication (2FA). +@node Dynamic DNS mcron job +@section Dynamic DNS mcron job + +@cindex dynamic DNS, DDNS +If your @acronym{ISP, Internet Service Provider} only provides dynamic +IP addresses, it can be useful to setup a dynamic @acronym{DNS, Domain +Name System} (also known as @acronym{DDNS, Dynamic DNS}) service to +associate a static host name to a public but dynamic (often changing) IP +address. There are multiple existing services that can be used for +this; in the following mcron job, @url{https://duckdns.org, DuckDNS} is +used. It should also work with other dynamic DNS services that offer a +similar interface to update the IP address, such as +@url{https://freedns.afraid.org/}, with minor adjustments. + +The mcron job is provided below, where @var{DOMAIN} should be +substituted for your own domain prefix, and the DuckDNS provided token +associated to @var{DOMAIN} added to the +@file{/etc/duckdns/@var{DOMAIN}.token} file. + +@lisp +(define duckdns-job + ;; Update personal domain IP every 5 minutes. + #~(job '(next-minute (range 0 60 5)) + #$(program-file + "duckdns-update" + (with-extensions (list guile-gnutls) ;required by (web client) + #~(begin + (use-modules (ice-9 textual-ports) + (web client)) + (let ((token (string-trim-both + (call-with-input-file "/etc/duckdns/@var{DOMAIN}.token" + get-string-all))) + (query-template (string-append "https://www.duckdns.org/" + "update?domains=@var{DOMAIN}" + "&token=~a&ip="))) + (http-get (format #f query-template token)))))) + "duckdns-update" + #:user "nobody")) +@end lisp + +The job then needs to be added to the list of mcron jobs for your +system, using something like: + +@lisp +(operating-system + (services + (cons* (service mcron-service-type + (mcron-configuration + (jobs (list duckdns-job ...)))) + ... + %base-services))) +@end lisp + @node Connecting to Wireguard VPN @section Connecting to Wireguard VPN base-commit: c7e45139faa27b60f2c7d0a4bc140f9793d97d47 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 16:15:48 2023 Received: (at 64883) by debbugs.gnu.org; 16 Aug 2023 20:15:48 +0000 Received: from localhost ([127.0.0.1]:42150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWMvk-0001Mz-IH for submit@debbugs.gnu.org; Wed, 16 Aug 2023 16:15:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWMvj-0001Mm-DS for 64883@debbugs.gnu.org; Wed, 16 Aug 2023 16:15:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWMve-0003V8-0s; Wed, 16 Aug 2023 16:15:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=wU0WTExzHWF42jY6w2rnRkDzdPPI4sq5CanV9pNxrxo=; b=Fh4NsM92swOQJhDu4r/4 N38CNupkDuTrEzKGjRlpMrzl6U/TgVScJyJnmtLJBweNh7jhOugaazZIh0/KiqlbJMHrhzZ7Ul92m OP9Zwtveceg/YZyaG1cH/Qpk8CFQ2jqVchYtVwRADqq7XdA1cIxn2kwoLLzuZVq8b3p0MCn2beTCl gTZ6iPPwf8ERnueY/wei0RtrIntw152wax2xSv8/FaqT0BpkqpAzQGQtFzniSRc/bY/J66s9LZ5pq JhjQjRQJbfyeXEPvVzAw0V8d7Ste3PqKMBM7j7WOzFofR7imTG6r7VGFzhWDIInlN1upxJ4GxrcSp feoW01MJAFtUJw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#64883: [PATCH] doc: cookbook: Document a dynamic DNS update mcron job. References: Date: Wed, 16 Aug 2023 22:15:39 +0200 In-Reply-To: (Maxim Cournoyer's message of "Wed, 26 Jul 2023 22:04:40 -0400") Message-ID: <87ttsy4uc4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64883 Cc: 64883@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer skribis: > * doc/guix-cookbook.texi (System Configuration) > : New subsection. Neat! Looks great to me; there=E2=80=99s a lot of demand for task-oriented tutorials like this one. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 23:57:17 2023 Received: (at 64883-done) by debbugs.gnu.org; 17 Aug 2023 03:57:17 +0000 Received: from localhost ([127.0.0.1]:42489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWU8K-0007mu-SF for submit@debbugs.gnu.org; Wed, 16 Aug 2023 23:57:17 -0400 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]:53712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWU8J-0007mf-Cu for 64883-done@debbugs.gnu.org; Wed, 16 Aug 2023 23:57:15 -0400 Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-64726360433so20016606d6.3 for <64883-done@debbugs.gnu.org>; Wed, 16 Aug 2023 20:57:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692244629; x=1692849429; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=x5PtLIAH5Sw3caXi3+EkCODzUC7O+VvFA6G5ZlwUVoc=; b=OC24jU1JXCJwDFoBTD+k3n1stJVMtaqWHRvBIv2rDM9o+z6S4Qmo6VavALEf4l1Cmv GNC5Ppj6f1g2EHoxT+0bgCzwySPFf08JISMN+2Vhj0zhCtMjJHFhjhPMZahlRyYk+swv fYX/EkVGWBXZY1j07CYZ6psbWlTwW2Bs6WGELhny2E1QaFkficPXNhZoga7whTV+Njen Uw5RvBPJZKvfejl1er6jplGKgu7abPBdHvJNpl9p64wNs1drNRswQazWzEk9h//usrxe 9QvKDIujGnUjzI5X9GM5PJOjMC4z5IrqWpSIGnAnG8ke0DnNcst/ZnjmIJ0LnZsqS4UP d8/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692244629; x=1692849429; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=x5PtLIAH5Sw3caXi3+EkCODzUC7O+VvFA6G5ZlwUVoc=; b=cQgR07vLH8Y+LiaLQ/XSAHUH3wj1v0/cMdaIvf05ZbpP0GRjZBD/ybk6N9Z8QW9tsO uFyd9yGcT6d4wCJKcWPU6Uiily5V2iPex//ZKXXd91l7tErLBO6VaCODimuOly9ulb4l BYN9JwrfOGZMaUeqbH7vep2GPmByhH9eD9oNk0Loo+uPgixZefT9Fi/Nl61UfNEyKV4F wYU2ZRbszJuU2mggd+UA7QIXZK9pWx9jPESP3C+E6sJWDZsPTPLLrOio85dFEMTM2bdu z5XB6cAD04rKePszhTnrhzsGz1bQosQevTxUd7u5i9+wz6qcCrwZRo89XBDnHVNB7YnO ntFA== X-Gm-Message-State: AOJu0Yy7SY0qvLRMgMPMi6XQL0x1+dJv7q+jm9AyOQyBmTORlL0Zstps UN7ZKHCOLIhu4/W48n/Y6jp47Q70HKIAFQ== X-Google-Smtp-Source: AGHT+IGk3grqH513wV6Ra4R6L54dlQkX79pc1kGRqJxCJYtxHWyGroCcx1EnX7oS5Gq+b/u7d+ddQw== X-Received: by 2002:a0c:b458:0:b0:647:40d3:56ec with SMTP id e24-20020a0cb458000000b0064740d356ecmr3940983qvf.62.1692244629615; Wed, 16 Aug 2023 20:57:09 -0700 (PDT) Received: from hurd (dsl-152-182.b2b2c.ca. [66.158.152.182]) by smtp.gmail.com with ESMTPSA id c17-20020a0cca11000000b006472e929300sm2069336qvk.35.2023.08.16.20.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 20:57:09 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#64883: [PATCH] doc: cookbook: Document a dynamic DNS update mcron job. References: <87ttsy4uc4.fsf@gnu.org> Date: Wed, 16 Aug 2023 23:57:08 -0400 In-Reply-To: <87ttsy4uc4.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 16 Aug 2023 22:15:39 +0200") Message-ID: <87il9egw2z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64883-done Cc: 64883-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> * doc/guix-cookbook.texi (System Configuration) >> : New subsection. > > Neat! Looks great to me; there=E2=80=99s a lot of demand for task-orient= ed > tutorials like this one. Great, thanks for reviewing! The change is now installed. --=20 Thanks, Maxim From unknown Sat Jun 21 05:14:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 14 Sep 2023 11:24:15 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator