aboutsummaryrefslogtreecommitdiff
path: root/content/blog/2022-03-23-cloudflare-dns-api.org
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
committerChristian Cleberg <[email protected]>2025-11-11 22:49:13 -0600
commit51a7a02f0c96d49b68fbcc155414c218207fa270 (patch)
tree845af8aad0e8769352efc02fcd1044eed9cc1ec1 /content/blog/2022-03-23-cloudflare-dns-api.org
parent7d3e80ebf1dc770eac0e21890b74f18ba2d15a6b (diff)
downloadcleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.gz
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.tar.bz2
cleberg.net-51a7a02f0c96d49b68fbcc155414c218207fa270.zip
fix grammar in 2022 posts
Diffstat (limited to 'content/blog/2022-03-23-cloudflare-dns-api.org')
-rw-r--r--content/blog/2022-03-23-cloudflare-dns-api.org42
1 files changed, 20 insertions, 22 deletions
diff --git a/content/blog/2022-03-23-cloudflare-dns-api.org b/content/blog/2022-03-23-cloudflare-dns-api.org
index af0e5e8..cc722aa 100644
--- a/content/blog/2022-03-23-cloudflare-dns-api.org
+++ b/content/blog/2022-03-23-cloudflare-dns-api.org
@@ -7,15 +7,15 @@
:PROPERTIES:
:CUSTOM_ID: ddns-dynamic-dns
:END:
-If you're hosting a service from a location with dynamic DNS (where your
-IP may change at any time), you must have a solution to update the DNS
-so that you can access your service even when the IP of the server
-changes.
+If you're hosting a service from a location with DDNS (Dynamic Domain Name
+System), where your internet protocol (IP)address may change at any time, you
+must have a solution to update the DNS (Domain Name System) so that you can
+access your service even when the IP of the server changes.
-The process below uses the [[https://api.cloudflare.com/][Cloudflare
-API]] to update DNS =A= and =AAAA= records with the server's current IP.
-If you use another DNS provider, you will have to find a way to update
-your DNS (or find a way to get a static IP).
+The process below uses the [[https://api.cloudflare.com/][Cloudflare API]] (application programming interface) to
+update DNS =A= and =AAAA= records with the server's current IP. If you use
+another DNS provider, you will have to find a way to update your DNS (or find a
+way to get a static IP).
First, install =jq= since we will use it in the next script:
@@ -23,18 +23,16 @@ First, install =jq= since we will use it in the next script:
sudo apt install jq
#+end_src
-Next, create a location for your DDNS update scripts and open the first
-script:
+Next, create a location for your DDNS update scripts and open the first script:
#+begin_src sh
mkdir ~/ddns
nano ~/ddns/update.sh
#+end_src
-The following =update.sh= script will take all of your domains and
-subdomains and check Cloudflare to see if the current =A= and =AAAA=
-records match your server's IP address. If not, it will update the
-records.
+The following =update.sh= script will take all of your domains and subdomains
+and check Cloudflare to see if the current =A= and =AAAA= records match your
+server's IP address. If not, it will update the records.
#+begin_src sh
# file: update.sh
@@ -60,16 +58,16 @@ do
done
#+end_src
-Next, open up the =ddns.sh= script. Paste the following into the script
-and update the =api_token= and =email= variables.
+Next, open up the =ddns.sh= script. Paste the following into the script and
+update the =api_token= and =email= variables.
#+begin_src sh
nano ~/ddns/ddns.sh
#+end_src
-*Note*: If you want your DNS records to be proxied through Cloudflare,
-find and update the following snippet: ="proxied":false}"= to say =true=
-instead of =false=.
+*Note*: If you want your DNS records to be proxied through Cloudflare, find and
+update the following snippet: ="proxied":false}"= to say =true= instead of
+=false=.
#+begin_src sh
# file: ddns.sh
@@ -179,14 +177,14 @@ You can test the script by running it manually:
./update.sh
#+end_src
-To make sure the scripts run automatically, add it to the =cron= file so
-that it will run on a schedule. To do this, open the cron file:
+To make sure the scripts run automatically, add it to the =cron= file so that it
+will run on a schedule. To do this, open the cron file:
#+begin_src sh
crontab -e
#+end_src
-In the cron file, paste the following at the bottom of the editor:
+In the =cron= file, paste the following at the bottom of the editor:
#+begin_src sh
,*/5 ** ** ** ** bash /home/<your_username>/ddns/update.sh