[Wayback/Archive] 🔎Julia Evans🔍 on Twitter: “I’ve always heard that you can’t create CNAME records at the root of the domain. But apparently you can? It seems to work fine as far as I can tell but I’m curious about the possible consequences. (yes, I registered cnameroot.com just to make this tweet) “
Archive for the ‘DNS’ Category
b0rk does fun things with DNS: CNAME records at the root of the domain; technically not allowed, definitely not recommended, but somehow work for web browsing
Posted by jpluimers on 2023/12/21
Posted in Cloud, Cloudflare, DNS, Infrastructure, Internet, Power User | Leave a Comment »
notes on updating DNS info with bind DNS
Posted by jpluimers on 2023/12/01
Steps:
- Edit the DNS zone file in
/var/lib/named/master - Make sure you updated the SOA serial number
rcnamed restart- Watch
/var/lib/named/log/generalfor errors (you can even increase logging, for instance by reading [Wayback/Archive] this serverfault entry and editing/etc/named.d/logging) and – on my system – these other logs for the actual zone transfers:/var/lib/named/log/in-xfer.logfor incoming zone transfers on the secondary server/var/lib/named/log/notify.logfor notifications of zone transfers on the primary and secondary servers/var/lib/named/log/out-xfer.logfor outgoing zone transfers on the primary server
- Check on [Wayback/Archive] mxtoolbox.com/SuperTool.aspx?action=dns:example.org&run=toolpage# to see if the SOA serials have been replicated (one day I will write a bookmarklet for this)
Alternatives for the last step are sites like these:
Posted in DNS, Internet, Power User | Leave a Comment »
Smart idea by corbosman on Twitter: he wrote a home grown DynDNS for transIP DNS changes
Posted by jpluimers on 2023/11/02
[Wayback/Archive] corbosman on Twitter: “I created a container in my private kubernetes cluster that checks if my ziggo ip address changes and if so, notifies me and makes some DNS changes through the API of my DNS provider. Last night Ziggo changed my IP and it worked flawlessly. Win!” / Twitter
His ISP: [Wayback/Archive] corbosman on Twitter: “@jpluimers transip“.
The Domain API for his ISP TransIP is at [Wayback/Archive] TransIP API: Domains (via [Wayback/Archive] transip dns api – Google Search).
–jeroen
Posted in Development, DNS, Internet, Power User, Scripting, Software Development | Leave a Comment »
mess with dns: a cool site to directly mess around with subdomains of messwithdns.net.
Posted by jpluimers on 2023/03/17
[Wayback/Archive] mess with dns: a cool site at messwithdns.net that allows you directly mess around with subdomains of messwithdns.com (yup: these are on different top level domains by intent, see [Wayback/Archive] mess with dns: about/FAQ).
Her blog post [Wayback/Archive] New tool: Mess with DNS! has a cool insightful explanation with lots of gifs showing what is going on. The below gif is just one of them:
In addition, it has a cool [Wayback/Archive] mess with dns: DNS dictionary explaining common DNS related terms.
The backend is written in Go, and has a snapshot of the initial source code on github at [Wayback/Archive] jvns/mess-with-dns-backend (mainly so you can file issues or submit ideas).
Oh, and this is a cool video that shows you how DNS works assuming the protocol is phone based: [Archive] Max Meier👨🏻💻🛡⚔️ on Twitter: “DNS Server …” / Twitter.
Posted in DNS, Internet, Power User | Leave a Comment »
Some notes on changing and checking bind DNS entries
Posted by jpluimers on 2023/01/09
DNS isn’t based on propagation, but on (cache) expiry. Which means it is all about TTL (Time to Live), and since humans are bad at coping with caching (remember the post There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors?), I needed some DNS refresh.
The time values in seconds of SOA (Start of Authority) and TTL record entries are always a pain, so hopefully this helps some:
- TTL values are decimal integers specifying seconds.
- [Wayback/Archive] TTL Calculator allows you to get readable values for the DNS TLL that mostly is specified in sections (which is a great unit of time, just a bit tedious for humans to comprehend larger values of)
- The SOA time values usually are kind of moot except for the final value, which is the negative answer time out if it is smaller than the default TTL.
- The last bit is explained by [Wayback/Archive] htaccess in detail in [Wayback/Archive] domain name system – How long does negative DNS caching typically last? – Server Fault and shortly in a comment to [Wayback/Archive] domain name system – Recommended DNS SOA record TTL default? – Server Fault
Note that the “default TTL” value is only used for the negative caching TTL if it is less than the TTL of the SOA record itself. See
5 - Caching Negative Answersof the referenced RFC for details. - The first bit is explained by [Wayback/Archive] Alnitak in [Wayback/Archive] domain name system – Recommended DNS SOA record TTL default? – Server Fault:
All of those settings (except for “default TTL”) only affect how frequently your domain’s secondary DNS servers poll the primary DNS server for updates.…Typically the primary should send aNOTIFYmessage to each of the secondaries whenever there’s an update at which point the secondaries grab the zone file immediately. These days the “refresh / retry / expire” mechanism is only a backstop to that.
- The last bit is explained by [Wayback/Archive] htaccess in detail in [Wayback/Archive] domain name system – How long does negative DNS caching typically last? – Server Fault and shortly in a comment to [Wayback/Archive] domain name system – Recommended DNS SOA record TTL default? – Server Fault
Some TTL recommendations of the DNS SOA record via [Wayback/Archive] dns soa ttl best practice – Google Search and [Wayback/Archive] dns recommended ttl values – Google Search:
- [Wayback/Archive.is] domain name system – Recommended DNS SOA record TTL default? – Server Fault question by [Wayback/Archive] Geoff Dalgas:
We currently have our DNS SOA record set to the following for stackoverflow.com:primary name server = ns1.p19.dynect.net serial = 2009090909 refresh = 3600 (1 hour) retry = 600 (10 mins) expire = 604800 (7 days) default TTL = 60 (1 min)Are there better choices for our refresh / retry / expire / default TTL for a site like stackoverflow.com which receives close to 1M pageviews per day? - [Wayback/Archive] Best practices for using TTL –
Generally, we recommend a TTL of 24 hours (86,400 seconds). However, if you are planning to make DNS changes, you should lower the TTL to 5 minutes (300 seconds) at least 24 hours in advance of making the changes. After the changes are made, increase the TTL back to 24 hours.
- [Wayback/Archive] How to Choose DNS TTL Values | RIPE Labs
- [Wayback/Archive] What is DNS TTL + Best Practices | Varonis
- [Wayback/Archive] dns recommended ttl values – Google Search
I’d rather have a good route for unplanned DNS changes (as in the past, quite a few were about those), so I settled for 3600 seconds (1 hour), but might go down to 600 seconds (10 minutes).
Checking DNS entries
- From the *nix console, if you have Bind DNS installed,
- remember that when specifying full domain names, they usually need to end in a terminating
.(forroot), linewww.pluimers.com. - for checking before reloading, the [Wayback/Archive]
named-checkzonecommand can be used, for instancenamed-checkzone pluimers.com /var/lib/named/master/pluimers.comornamed-checkzone pluimers.com /var/lib/named/slave/pluimers.com, - after editing the zone, you can either restart named, or run
rndc reloadto reload the zone locally on the primary DNS name server and potentially notify secondary DNS name servers to renew their copy so become synced, - for checking after reloading, the
digcommand can be used, but the syntax of it can be tricky; I usually try eitherdig +noall +answer +multiline ANY pluimers.com @localhostordig +noall +answer +multiline AXFR pluimers.com @localhostA nice overview of usefuldigcommands is at [Wayback/Archive] 10 Most used DIG commands – ClouDNS Blog, - if secondary servers to not update, you can try
rndc retransfer domain.com, but usually it means something is wrong in the communication between the servers.
- remember that when specifying full domain names, they usually need to end in a terminating
- [Wayback/Archive] DNS Lookup – Check DNS Records of Domain can verify any type of DNS records on any DNS name server that is accessible from the internet from both the main page and detail pages for the various DNS record types These I use most:
- [Wayback/Archive] A Record Lookup – Check DNS IPv4 Records of Domain
- [Wayback/Archive] TXT Lookup – Check DNS TXT Records of Domain
- [Wayback/Archive] CNAME Lookup – Check DNS CNAME Record of Domain
- [Wayback/Archive] AAAA Lookup – Check DNS IPv6 Records of Domain
- [Wayback/Archive] MX Lookup – Check DNS MX Records of Domain
- [Wayback/Archive] SOA Lookup – Check DNS SOA Records of Domain
Note that the main page not only lists all DNS record types, but also has good links to their documentation. Recommended if you bump into issues and need more background information.
- [Wayback/Archive] Simple DNS Plus – Tools and add-ons has some more DNS testing pages
- [Wayback/Archive] Simple DNS Plus – Remote DNS look up is like the above one page lookup, and has the added benefit of defaulting to your WAN IP address (either IPv4 or IPv6) as name server (which often is the case)
- [Wayback/Archive] Trace DNS Delegation shows the full trace from the DNS root name servers down to one of the authoritative DNS name servers for the underlying domain
- [Wayback/Archive] Simple DNS Plus – IDN Conversion Tool converts back and forth between native and punycode characters, which is great when domain names contain emoji or other non-ASCII characters
- Some nice Q&A:
- [Wayback/Archive] internal dns – List all DNS records in a domain using dig? – Server Fault
- [Wayback/Archive] domain name system – DNS: How to find out which software a remote DNS server is running – Server Fault
- which got me to [Wayback/Archive] kirei/fpdns: Net: :Fingerprint
- [Wayback/Archive] Bind, force zone update on slave – Server Fault
Changing DNS entries
Some information on the DNS “master” files (which contain the RR or “resource records”) from [Wayback/Archive.is] RFC1035: domain names – implementation and specification and [Wayback/Archive] RFC2308: Negative Caching of DNS Queries (DNS NCACHE), as keep forgetting them.
Both RFCs together specify that these line entries are defined (i.e. can be valid):
<blank>[<comment>] $ORIGIN <domain-name> [<comment>] $INCLUDE <file-name> [<domain-name>] [<comment>] <domain-name><rr> [<comment>] <blank><rr> [<comment>]
and that these are the valid <rr> or resource record formats:
[<TTL>] [<class>] <type> <RDATA> [<class>] [<TTL>] <type> <RDATA>
If you do a DNS zone transfer – Wikipedia (often abbreviated to the DNS query type AXFR), then these entries always are single line with fields expanded, with each always having an absolute <domain name> entry ending in a dot (.), and read like this:
<domain name> TTL <class> <type> <RDATA>
From the specific RFCs:
- RFC 1035 section 3.2.4: CLASS values
- The
INis sort of mandatory class, and means “1 the Internet” (still seldom in use isCH, which stands forCH 3 the CHAOS class). INis also the default and can be ommited according to [Wayback/Archive.is] Sandman4 in [Wayback/Archive] domain name system – BIND/DNS Zone meaning of “IN” – Server Fault:
if class is not explicitly specified, the default “IN” is used.
- The
- RFC 1035 section 5.1: master files – format
- White space to separate items on a line can be spaces or tabs
- Comments start with semi-colon (
;), which means that hashes (#) or double-slashes (//) won’t work and are syntax errors (the above mentioned toolnamed-checkzonecan help you figure out those syntax errors). - There are line entries for blank,
$ORIGIN,$INCLUDE, and resource record. - A line entry starting with
$ORIGINdefines the current origin to be used from then on. Without such entry, he default origin can be defined through a parameter when loading the master file (see the Zone file: localhost example file) - Resource record line entries can start with:
@to use the current origin as domain name.- a specified
<domain-name>to denote the domain name to be used - no
<domain-name>indicating the previous domain name to be used
- A
<domain-name>can be absolute ending in a dot (.)), or relative (in which case the origin is appended). - No
<TTL>or no<class>value means to use the previous TTL or class values to be used. - One resource record entry per line, unless you put parenthesis, then you can wrap it over multiple lines, which can be convenient for SOA record like this:
@ IN SOA ns1.4delphi.com. hostmaster.4delphi.com. ( 2021112201 ; serial 3600 ; refresh every 1 hour 120 ; retry every 2 minutes 1209600 ; expire in 2 weeks 10800 ; now is 3 hours (see RFC2308) used to be 2 days: 172800 ; default_ttl )
- RFC2308 section 4: SOA Minimum Field
- The
$TTLline entry defining the default TTL to be used from then on (similar to$ORIGIN)
- The
There is more (like encoding of domain names, more resource record types, and domain name length limitations), but those go beyond this blog post.
Examples on Wikipedia
Zone file: Example file is great:
$ORIGIN example.com. ; designates the start of this zone file in the namespace
$TTL 3600 ; default expiration time (in seconds) of all RRs without their own TTL value
example.com. IN SOA ns.example.com. username.example.com. ( 2020091025 7200 3600 1209600 3600 )
example.com. IN NS ns ; ns.example.com is a nameserver for example.com
example.com. IN NS ns.somewhere.example. ; ns.somewhere.example is a backup nameserver for example.com
example.com. IN MX 10 mail.example.com. ; mail.example.com is the mailserver for example.com
@ IN MX 20 mail2.example.com. ; equivalent to above line, "@" represents zone origin
@ IN MX 50 mail3 ; equivalent to above line, but using a relative host name
example.com. IN A 192.0.2.1 ; IPv4 address for example.com
IN AAAA 2001:db8:10::1 ; IPv6 address for example.com
ns IN A 192.0.2.2 ; IPv4 address for ns.example.com
IN AAAA 2001:db8:10::2 ; IPv6 address for ns.example.com
www IN CNAME example.com. ; www.example.com is an alias for example.com
wwwtest IN CNAME www ; wwwtest.example.com is another alias for www.example.com
mail IN A 192.0.2.3 ; IPv4 address for mail.example.com
mail2 IN A 192.0.2.4 ; IPv4 address for mail2.example.com
mail3 IN A 192.0.2.5 ; IPv4 address for mail3.example.com
as well as the examples at Zone file: Localhost:
An example for manual configuration of the forward zone for localhost is the following:
$ORIGIN localhost. @ 86400 IN SOA @ root ( 1999010100 ; serial 10800 ; refresh (3 hours) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; minimum (1 day) ) @ 86400 IN NS @ @ 86400 IN A 127.0.0.1 @ 86400 IN AAAA ::1The corresponding reverse zone definition is:
;; reverse zone file for 127.0.0.1 and ::1 $TTL 1814400 ; 3 weeks @ 1814400 IN SOA localhost. root.localhost. ( 1999010100 ; serial 10800 ; refresh (3 hours) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; minimum (1 day) ) @ 1814400 IN NS localhost. 1 1814400 IN PTR localhost.This file does not specify the origin so that it may be used for both IPv4 and IPv6 with this configuration:
zone "0.0.127.in-addr.arpa" IN { type master; file "r.local"; }; zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN { type master; file "r.local"; };Similar zone master files may be created for the reverse resolution of the broadcast address and the null address. Such zone files prevent a DNS server from referring to other, possibly external DNS servers.
Related
OpenSuSE: the relation between /etc/var/named.d and /var/lib/named
—jeroen
Posted in DNS, Internet, Power User | Leave a Comment »
Getting your public IP address from the command-line when http and https are blocked: use DNS
Posted by jpluimers on 2022/12/28
Years ago, I wrote Getting your public IP address from the command-line. All methods were http based, so were very easy to execute using cURL.
But then in autumn 2021, Chris Bensen wrote this cool little blog-post [Wayback/Archive] Chris Bensen: How do I find my router’s public IP Address from the command line?:
dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com
At first sight, I thought it was uncool, as the command was quite long and there was no explanation of the dig command trick.
But then, knowing that dig is a DNS client, it occurred to me: this perfectly works when http and https are disabled by your firewall, but the DNS protocol works and gives the correct result:
# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com "80.100.143.119"
This added the below commands and aliases to my tool chest for *nix based environments like Linux and MacOS (not sure yet about Windows yet :), but that still doesn’t explain why it worked. So I did some digging…
IPv4
- command:
dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com - command removing outer double quotes:
dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs - alias:
alias "whatismyipv4_dns=dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs"
IPv6
- command:
dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com - command removing outer double quotes:
dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs - alias:
alias "whatismyipv6_dns=dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs"
How it works
Let’s stick to dig and IPv4 as that not having IPv6 (regrettably still) is the most common situation today:
# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com "80.100.143.119"
What it does is request the DNS TXT record of o-o.myaddr.l.google.com from the Google DNS server ns1.google.com and returns the WAN IPv4 address used in the DNS request, which is for instance explained in [Wayback/Archive] What is the mechanics behind “dig TXT o-o.myaddr.l.google.com @ns1.google.com” : linuxadmin.
Since these are TXT records, dig will automatically double quote them, which xargs can remove (see below how and why):
# dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | xargs 80.100.143.119
The DNS query will fail when requesting the Google Public DNS servers 8.8.8.8 or 8.8.4.4:
# dig -4 TXT +short o-o.myaddr.l.google.com @8.8.8.8 "2a00:1450:4013:c1a::103" "edns0-client-subnet 80.101.239.0/24"
Or, with quotes removed (the -L 1 ensures that xargs performs the quote-pair removal action on each line):
# dig -4 TXT +short o-o.myaddr.l.google.com @8.8.8.8 | xargs -L 1 2a00:1450:4013:c1a::103 edns0-client-subnet 80.101.239.0/24
This request is both slower than requesting the ns1.google.com server and wrong.
The reason is that only ns1.google.com understands the special o-o.myaddr.l.google.com hostname which instructs it to return the IP address of the requesting dig DNS client.
That 8.8.8.8 returns a different IP address and an additional edns0-client-subnet with less accurate information is explained in an answer to [Wayback/Archive] linux – Getting the WAN IP: difference between HTTP and DNS – Stack Overflow by [Wayback/Archive] argaz referring to this cool post: [Wayback/Archive] Which CDNs support edns-client-subnet? – CDN Planet.
Not just ns1.google.com: any DNS server serving the google.com domain
Since o-o.myaddr.l.google.com is part of the google.com domain, the above works for any DNS server serving the google.com domain (more on that domain: [Wayback/Archive] General DNS overview | Google Cloud).
Getting the list of DNS servers is similar to getting the list of MX servers which I explained in Getting the IP addresses of gmail MX servers, replacing MX record type (main exchange) with the NS record type (name server) and the gmail.com domain with the google.com domain:
# dig @8.8.8.8 +short NS google.com ns3.google.com. ns1.google.com. ns2.google.com. ns4.google.com.
The ns1.google.com DNS server is a special one of the NS servers: it is the start of authority server, which you can query using the SOA record type that also gives slightly more details for this server:
# dig @8.8.8.8 +short SOA google.com ns1.google.com. dns-admin.google.com. 410477869 900 900 1800 60
The difference between using NS and SOA records with dig are explained in the [Wayback] dns – How do I find the authoritative name-server for a domain name? – Stack Overflow answer by [Wayback/Archive] bortzmeyer who also explains how to help figuring out SOA and NS discrepancies (note to self: check out the check_soa tool originally by Michael Fuhr (I could not find recent content of him, so he might have passed away) of which source code is now at [Wayback/Archive] Net-DNS/check_soa at master · NLnetLabs/Net-DNS).
So this works splendid as well using ns4.google.com on my test system:
# dig -4 TXT +short o-o.myaddr.l.google.com @ns4.google.com | xargs 80.100.143.119
The xargs removes outer quotes removal trick
[Wayback/Archive] string – Shell script – remove first and last quote (“) from a variable – Stack Overflow (thanks quite anonymous [Wayback/Archive] user1587520):
> echo '"quoted"' | xargs quoted
xargsusesechoas the default command if no command is provided and strips quotes from the input.
More on https versus DNS requests
Some notes are in [Wayback/Archive] How to get public IP address from Linux shell, but note the telnet trick now fails as myip.gelma.net is gone (latest live version was archived in the Wayback Machine in august 2019).
Via
- [Archive] Jeroen Wiert Pluimers on Twitter: “Hi @chrisbensen, I just saw … I use this alias: alias
whatismyipv4='curl ipv4.whatismyip.akamai.com && echo'It’s a quite a bit shorter than the dig construct in your post (;” - [Wayback/Archive] Chris Bensen on Twitter: “I’ll edit the post tomorrow.… “
- [Archive] Jeroen Wiert Pluimers on Twitter: “I gave your post some more thought. The cool thing about your dig command is that it works when http traffic is blocked, and DNS traffic is allowed. That is an important point to make, as in some situations, this can actually be the case.… “
–jeroen
Posted in *nix, *nix-tools, Apple, bash, bash, Batch-Files, Communications Development, Development, DNS, Internet protocol suite, Linux, Mac, Mac OS X / OS X / MacOS, Power User, Scripting, Software Development, TCP | Leave a Comment »
Viewing the most recent Windows DNS requests on the console
Posted by jpluimers on 2022/07/18
I missed that over time, ipconfig has been extended with some more commands.
The command ipconfig /displaydns does exaxctly what I want: Display the contents of the DNS Resolver Cache.
The ipconfig help:
USAGE: ipconfig [/allcompartments] [/? | /all | /renew [adapter] | /release [adapter] | /renew6 [adapter] | /release6 [adapter] | /flushdns | /displaydns | /registerdns | /showclassid adapter | /setclassid adapter [classid] | /showclassid6 adapter | /setclassid6 adapter [classid] ] where adapter Connection name (wildcard characters * and ? allowed, see examples) Options: /? Display this help message /all Display full configuration information. /release Release the IPv4 address for the specified adapter. /release6 Release the IPv6 address for the specified adapter. /renew Renew the IPv4 address for the specified adapter. /renew6 Renew the IPv6 address for the specified adapter. /flushdns Purges the DNS Resolver cache. /registerdns Refreshes all DHCP leases and re-registers DNS names /displaydns Display the contents of the DNS Resolver Cache. /showclassid Displays all the dhcp class IDs allowed for adapter. /setclassid Modifies the dhcp class id. /showclassid6 Displays all the IPv6 DHCP class IDs allowed for adapter. /setclassid6 Modifies the IPv6 DHCP class id. The default is to display only the IP address, subnet mask and default gateway for each adapter bound to TCP/IP. For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters bound to TCP/IP will be released or renewed. For Setclassid and Setclassid6, if no ClassId is specified, then the ClassId is removed. Examples: > ipconfig ... Show information > ipconfig /all ... Show detailed information > ipconfig /renew ... renew all adapters > ipconfig /renew EL* ... renew any connection that has its name starting with EL > ipconfig /release *Con* ... release all matching connections, eg. "Wired Ethernet Connection 1" or "Wired Ethernet Connection 2" > ipconfig /allcompartments ... Show information about all compartments > ipconfig /allcompartments /all ... Show detailed information about all compartments
Via:
- [Wayback/Archive.is] Here is how to view DNS cache on any Windows 10 computer – Auslogics blog
- [Wayback/Archive.is] DNS Logging and Diagnostics | Microsoft Docs
–jeroen
Posted in DNS, Internet, Power User, Windows, Windows 10 | Leave a Comment »
Setting up a GitLab project so it is served over https as a gitlab.io and a custom subdomain
Posted by jpluimers on 2022/05/05
Last week, I posted about Setting up a GitHub project so it is served over https as a custom github.io subdomain.
Today it’s the equivalent, but on GitLab.
Why GitLab? Two major reasons: unlike GitHub:
- it’s open source
- provides way more granular control over permissions
- allows a hierarchy of repositories on which you can specify that permission control
Already 2. and 3. combined are a huge advantage, though we will see that 3. also makes some of the subcases (hosting as user.gitlab.io from account gitlab.com/user where user is your username) is harder than the similar user.github.io, github.com/user combo.
So here we go, starting with a similar set of links:
- [Wayback] GitLab Pages | GitLab
- Links outside the Table of Contents:
- [Wayback] Static vs Dynamic Websites – What’s the difference? | GitLab
- [Wayback] All About Modern Static Site Generators | GitLab
- [Wayback] SSGs Part 3: Build any SSG site with GitLab Pages | GitLab
- [Wayback] Posting to your GitLab Pages blog from iOS | GitLab
- [Wayback] GitLab CI: Run jobs sequentially, in parallel or build a custom pipeline | GitLab
- [Wayback] How to use GitLab CI to deploy to multiple environments | GitLab
- [Wayback] Building a new GitLab Docs site with Nanoc, GitLab CI, and GitLab Pages | GitLab
- [Wayback] Publish code coverage report with GitLab Pages | GitLab
- [Wayback] Tutorial: Create a GitLab Pages website from scratch | GitLab
- [Wayback] Create a Pages website by using a CI/CD template | GitLab
- [Wayback] Create a Pages website from a forked sample | GitLab
- Links outside the Table of Contents:
- [Wayback] Create a Pages website from a template | GitLab
- [Wayback] GitLab Pages domain names, URLs, and base URLs | GitLab
- [Wayback] Custom domains and SSL/TLS certificates | GitLab
- [Wayback] DNS records overview | GitLab
- [Wayback] SSL/TLS certificates | GitLab
- [Wayback] GitLab Pages integration with Let’s Encrypt | GitLab
- [Wayback] GitLab Pages access control | GitLab
- [Wayback] Create redirects for GitLab Pages | GitLab
- [Wayback] Exploring GitLab Pages | GitLab
- Links outside the Table of Contents:
- [Wayback/Archive] Keyword reference for the `
.gitlab-ci.yml` file | GitLab
- Links outside the Table of Contents:
- Golang source code: [Wayback/Archive.is] GitLab.org / gitlab-pages · GitLab
- [Wayback] Hosting on GitLab.com with GitLab Pages | GitLab
The goal is to have
- page projects as or under
wiert.gitlab.io(likewiert.gitlab.io/wiert) - a
gitlabstatus.wiert.meplain html (or maybe markdown) page project that eventually will show some status information (kind of like status.gitlab.com, but for different things).
The beauty of GitLab is that it supports hierarchies of repositories through groups and subgroups, so I already had these subgroups hoping they would cover both the first and second kind of page projects:
Steps I did
Since there are quite a few links above, here are the steps I took from my gitlab.com/wiert account and gitlab.com/wiert.me group.
Steps for wiert.gitlab.io/wiert
- For wiert.gitlab.io/wiert, try A (failed in part, and therefore interesting to understand why):
- Under leaf group gitlab.com/wiert.me/public/web/sites/gitlab.io, created a new GitLab repository
- Chose “Create from template”
- Chose the template “Pages/Plain HTML”
- Named the project “
wiert” (with slug “wiert“) so it would appear at gitlab.com/wiert.me/public/web/sites/gitlab.io/wiert - From the left sidebar, navigated to your project’s “CI/CD”, then “Pipelines”
- Now I got in a confusing situation as the page indicated “There are currently no pipelines.”, but an enabled blue “Run pipeline” button:

By default there is no CI/CD pipeline, but there is an enabled blue “Run pipeline” button: confusing.
- Clicked the “Run pipeline” button nonetheless, and that created [Wayback/Archive.is] a pipeline asking for parameters (that already had correct default values) and revealed a new blue “Run pipeline” button.
- Clicked that new “Run pipeline button” which created [Wayback/Archive.is] a job and deployed the page.
- From the left sidebar, navigated to “Settings”, then “Pages” to get the links to the pages site: http://wiert.me.gitlab.io/public/web/sites/gitlab.io/wiert/ and https://wiert.me.gitlab.io/public/web/sites/gitlab.io/wiert/

Warning: When using Pages under the general domain of a GitLab instance (gitlab.io), you cannot use HTTPS with sub-subdomains.
The sites do work (see the [Archive.is http version] and [Archive.is https version]), but the HTTPS fails because
wiert.me.gitlab.iodoes not match the SANs (Subject Alternative Names) in the certificate:*.gitlab.io, gitlab.io
- For wiert.gitlab.io/wiert, try B (failed, and therefore interesting to understand why):
- In my my groups gitlab.com/dashboard/groups, added a new group
wiert - Added subgroups until the leaf
gitlab.com/wiert/public/web/sites/gitlab.iowhich as URL is gitlab.com/wier1/public/web/sites/gitlab.io because user accountwiertalready occupies gitlab.com/wiert. - Under leaf group gitlab.com/wier1/public/web/sites/gitlab.io, created a new GitLab repository
- Chose “Create from template”
- Chose the template “Pages/Plain HTML”
- Named the project “
wiert” (with slug “wiert“) so it would appear at gitlab.com/wiert.me/public/web/sites/gitlab.io/wiert - From the left sidebar, navigated to your project’s “CI/CD”, then “Pipelines”
- Again there was “There are currently no pipelines.”, but an enabled blue “Run pipeline” button, which I clicked
- That created [Wayback/Archive.is] a pipeline asking for parameters (that already had correct default values) and revealed a new blue “Run pipeline” button.
- Clicked that new “Run pipeline button” which created [Wayback/Archive.is] a job deployed the page.
- From the left sidebar, navigated to “Settings”, then “Pages” to get the links to the pages site: http://wier1.gitlab.io/public/web/sites/gitlab.io/wiert and https://wier1.gitlab.io/public/web/sites/gitlab.io/wiert.
Bummer: again not thewiert.gitlab.io/wiertI hoped for
The sites do work (see the [Archive.is http version] and [Archive.is https version]). The HTTP does not redirect to the HTTP version, as I did not tick the☐ Force HTTPS (requires valid certificates)
-
If a user
wiertexists and occupiesgitlab.com/wiert, then a group namedwiertcannot occupygitlab.com/wiert, and therefore a project namedwiertwithin that group won’t be deployed towiert.gitlab.io/wiert.
Maybe this can be shortened like “if there is a userwiert, then no group namedwiertcannot be used to contain a project namedwiertto host aswiert.gitlab.io/wiert“.
Let’s find out!
- In my my groups gitlab.com/dashboard/groups, added a new group
- For wiert.gitlab.io/wiert, try C (success, steps 1, 3, 4, 7 and 8 were the key ones):
- In my user gitlab.com/wiert, created a new GitLab repository
- Chose “Create from template”
- Chose the template “Pages/Plain HTML”
- Named the project “
wiert” (with slug “wiert“) so it would appear at gitlab.com/wiert - The odd but cool thing is that the actual project now ended up at gitlab.com/wiert/wiert:
- From the left sidebar, navigated to your project’s “CI/CD”, then “Pipelines”
- Again there was “There are currently no pipelines.”, but an enabled blue “Run pipeline” button, which I clicked
- That created [Wayback/Archive.is] a pipeline asking for parameters (that already had correct default values) and revealed a new blue “Run pipeline” button.
- Clicked that new “Run pipeline button” which created [Wayback/Archive.is] a job deployed the page.
- From the left sidebar, navigated to “Settings”, then “Pages” to get the links to the pages site: http://wiert.gitlab.io/wiert/ and https://wiert.gitlab.io/wiert/.
Success: finally thewiert.gitlab.io/wiertI hoped for:
Success: published at https://wiert.gitlab.io/wiert/
The sites do work fine (see the [Archive.is http version] and [Archive.is https version]). The HTTP does not redirect to the HTTP version, as I did not tick the
☐ Force HTTPS (requires valid certificates)
Steps for wiert.gitlab.io
- For wiert.gitlab.io, try A (failed, and therefore interesting to understand why):
- Under leaf group gitlab.com/wiert.me/public/web/sites/gitlab.io, created a new GitLab repository
- Chose “Create from template”
- Chose the template “Pages/Plain HTML”
- Named the project “
wiert.gitlab.io” (with slug “wiert.gitlab.io“) so it would appear at gitlab.com/wiert.me/public/web/sites/gitlab.io/wiert.gitlab.io - From the left sidebar, navigated to your project’s “CI/CD”, then “Pipelines”
- Again there was “There are currently no pipelines.”, but an enabled blue “Run pipeline” button, which I clicked
- That created [Wayback/Archive.is] a pipeline asking for parameters (that already had correct default values) and revealed a new blue “Run pipeline” button.
- Clicked that new “Run pipeline button” which created [Wayback/Archive.is] a job deployed the page.
- From the left sidebar, navigated to “Settings”, then “Pages” to get the links to the pages site: http://wiert.me.gitlab.io/public/web/sites/gitlab.io/wiert.gitlab.io and https://wiert.me.gitlab.io/public/web/sites/gitlab.io/wiert.gitlab.io.
Failure: not thewiert.gitlab.ioI hoped for.The sites do work (see the [Archive.is http version] and [Archive.is https version]), but the HTTPS fails becausewiert.me.gitlab.iodoes not match the SANs (Subject Alternative Names) in the certificate:*.gitlab.io, gitlab.io. The HTTP does not redirect to the HTTP version, as I did not tick the☐ Force HTTPS (requires valid certificates)
- For wiert.gitlab.io, try B (failed, and therefore interesting to understand why):
- Under leaf group gitlab.com/wier1/public/web/sites/gitlab.io, created a new GitLab repository
- Chose “Create from template”
- Chose the template “Pages/Plain HTML”
- Named the project “
wiert.gitlab.io” (with slug “wiert.gitlab.io“) so it would appear at gitlab.com/wier1/public/web/sites/gitlab.io/wiert.gitlab.io - From the left sidebar, navigated to your project’s “CI/CD”, then “Pipelines”
- Again there was “There are currently no pipelines.”, but an enabled blue “Run pipeline” button, which I clicked
- That created [Wayback/Archive.is] a pipeline asking for parameters (that already had correct default values) and revealed a new blue “Run pipeline” button.
- Clicked that new “Run pipeline button” which created [Wayback/Archive.is] a job deployed the page.
- From the left sidebar, navigated to “Settings”, then “Pages” to get the links to the pages site: http://wier1.gitlab.io/public/web/sites/gitlab.io/wiert.gitlab.io and https://wier1.gitlab.io/public/web/sites/gitlab.io/wiert.
Bummer: again not thewiert.gitlab.ioI hoped for
The sites do work (see the [Archive.is http version] and [Archive.is https version]). The HTTP does not redirect to the HTTP version, as I did not tick the☐ Force HTTPS (requires valid certificates)
-
Try A and B were almost identical to wiert.gitlab.io/wiert try A and B, so let’s see if the solution C for that also works for us:
- For wiert.gitlab.io, try C (success, steps 1, 3, 4, 7 and 9 were the key ones)
- In my user gitlab.com/wiert, created a new GitLab repository
- Chose “Create from template”
- Chose the template “Pages/Plain HTML”
- Named the project “
wiert.gitlab.io” (with slug “wiert.gitlab.io“) so it would appear at gitlab.com/wiert/wiert.gitlab.io. - From the left sidebar, navigated to your project’s “CI/CD”, then “Pipelines”
- Again there was “There are currently no pipelines.”, but an enabled blue “Run pipeline” button, which I clicked
- That created [Wayback/Archive.is] a pipeline asking for parameters (that already had correct default values) and revealed a new blue “Run pipeline” button.
- Clicked that new “Run pipeline button” which created [Wayback/Archive.is] a job deployed the page.
- From the left sidebar, navigated to “Settings”, then “Pages” to get the links to the pages site: http://wiert.gitlab.io/ and https://wiert.gitlab.io/.
Success: finally thewiert.gitlab.ioI hoped for with working sites (see the [Archive.is http version] and [Archive.is https version]). - Note the HTTP does not redirect to the HTTP version, as I did not tick the
☐ Force HTTPS (requires valid certificates)
Steps for gitlabstatus.wiert.me
Having learned from the GitHub githubstatus.wiert.me procedure (where I had to wait a long time for the default *.wiert.me domain mapping timeout and the githubstatus.wiert.me DNS CNAME record to become effective), I started on the DNS CNAME record side which is documented at [Wayback] Custom domains and SSL/TLS certificates: Section 3. Set up DNS records for Pages: For subdomains | GitLab:
Subdomains (
subdomain.example.com) require:
- A DNS
CNAMErecord pointing your subdomain to the Pages server.- A DNS
TXTrecord to verify your domain’s ownership.
From DNS Record To subdomain.example.comCNAMEnamespace.gitlab.io_gitlab-pages-verification-code.subdomain.example.comTXTgitlab-pages-verification-code=00112233445566778899aabbccddeeffNote that, whether it’s a user or a project website, the
CNAMEshould point to your Pages domain (namespace.gitlab.io), without any/project-name.
The value for the TXT record is only known after you created the pages project, but the value for the CNAME record is known beforehand:
From DNS Record To gitlabstatus.wiert.meCNAMEnamespace.gitlab.io
So let’s see if I can do this in one try, with these steps:
- For gitlabstatus.wiert.me, try A (success, steps 1, 3, 4, 7 and 9 were the key ones)
- In my DNS settings of the wiert.me domain, created a
CNAMErecord fromgitlabstatus.wiert.metonamespace.gitlab.io:
gitlabstatus.wiert.me
CNAMErecord pointing to namespace.gitlab.io - Under leaf group gitlab.com/wiert.me/public/web/sites/wiert.me, created a new GitLab repository
- Chose “Create from template”
- Chose the template “Pages/Plain HTML”
- Named the project “
gitlabstatus.wiert.me” (with slug “gitlabstatus.wiert.me“) so it would appear at gitlab.com/wiert.me/public/web/sites/wiert.me/gitlabstatus.wiert.me - From the left sidebar, navigated to your project’s “CI/CD”, then “Pipelines”
- Again there was “There are currently no pipelines.”, but an enabled blue “Run pipeline” button, which I clicked
- That created [Wayback/Archive.is] a pipeline asking for parameters (that already had correct default values) and revealed a new blue “Run pipeline” button.
- Clicked that new “Run pipeline button” which created [Wayback/Archive.is] a job deployed the page.
- From the left sidebar, navigated to “Settings”, then “Pages” to get the links to the pages site: http://wiert.me.gitlab.io/public/web/sites/wiert.me/gitlabstatus.wiert.me and https://wiert.me.gitlab.io/public/web/sites/wiert.me/gitlabstatus.wiert.me.
Intermediate success: working sites (see the [Archive.is http version] and [Archive.is https version]).
- Now it is time to get the DNS
CNAMErecord fromgitlabstatus.wiert.metonamespace.gitlab.iointo operation by clicking the “New Domain” button:

“New Domain” button in the “Pages” settings.
-
There I filled in the correct
gitlabstatus.wiert.medomain name, then pressed the “Create New Domain” button:
New domain becomes
gitlabstatus.wiert.me - Then a page appeared voiding the DNS
CNAMEwork I already did: the documentation is clearly wrong as these are the two DNS record entries to be made as shown by gitlab.com/wiert.me/public/web/sites/wiert.me/gitlabstatus.wiert.me/pages/domains/gitlabstatus.wiert.me:

Correct instructions for the DNS records to get gitlabstatus.wiert.me working
Subdomains (
gitlabstatus.wiert.me) require:- A DNS
CNAMErecord pointing your subdomain to the Pages server. - A DNS
TXTrecord to verify your domain’s ownership.
From DNS Record To gitlabstatus.wiert.meCNAMEwiert.me.gitlab.io._gitlab-pages-verification-code.gitlabstatus.wiert.meTXTgitlab-pages-verification-code=c5619988d386b1a36c253ce05db55dbbBasically the whole
namespace.gitlab.iopart of the documentation is a placeholder for the actualnamespacethat belongs to the leaf group the pages project is in (in my casewiert.me).So this is the new DNS entry, for which I had to wait until the DNSTTLto time out and effectuate:
New DNS gitlabstatus.wiert.me
CNAMErecord pointing to wiert.me.gitlab.ioNote that this DNS administrative interface from WordPress.com does omit the final period of the
CNAMEdestination (officially this would bewiert.me.gitlab.io.) - A DNS
- After the
CNAMEDNS record, I also made the TXT DNS record:

New DNS TXT record for verification of gitlabstatus.wiert.me
Then I waited a little for the DNS
TXTrecord to be saved and try the verification of theTXTrecord. - Even then, verification took some time. I had to click the refresh button a few times before verification succeeded:

The DNS TXT record for gitlabstatus.wiert.me finally got verified
- Now I could press blue “Save Changes” button below and waited for the
CNAMErecord DNSTTLto expire so I could check the domain and – hopefully – the TLS certificate to be requested by Let’s Encrypt:

After the
gitlabstatus.wiertDNS TXT record got verified, I could save the domain information - After the old
CNAMErecord DNSTTLexpired and the newCNAMErecord came into effect, the domain became available as http://gitlabstatus.wiert.me/:

Waiting for
gitlabstatus.wiert.meto become active - After verification, the “Domains (1)” bit changed from this:

Domain
gitlabstatus.wiert.meinformation before verificationto this:

Domain
gitlabstatus.wiert.meinformation after verification - In the mean time, also the TLS certificate got issued by Let’s Encrypt, so the final sites now both worked: http://gitlabstatus.wiert.me/ and https://gitlabstatus.wiert.me/.
- Success: finally the
gitlabstatus.wiert.meI hoped for with working sites (see the [Archive.is http version] and [Archive.is https version] for thewiert.medomain, and [Archive.is http version] and [Archive.is https version] for thewiert.medomain). - Note the HTTP does not redirect to the HTTP version, as I did not tick the
☐ Force HTTPS (requires valid certificates)
- In my DNS settings of the wiert.me domain, created a
In retrospect, this could have been shorter when I had done the DNS part later, which is contrary to how to do this with GitHub.
Conclusion
The conclusion seems this:
Gitlab Page repositories to be published as or under
wiert.gitlab.ioneed to reside directly under userwiert. Having them reside under a different group likewiertorwiert.mewon’t work.
Or in more generic terms:
When creating pages as
user.gitlab.ioyou have to put your pages projects directly under your user accountgitlab.com/user.Putting them under groups or leaf groups fails, no matter if the (leaf) group is named
useror otherwise.
In addition, you can add custom domains to any Gitlab repository (even one that never stated out as a GitLab Pages repository). It will work as soon as the domain DNS mapping is setup through both a CNAME mapping record and TXT verification record.
The steps for this in your GitLab repository are:
- Ensure you have a valid
.gitlab-ci.ymlfile at the root of your repository; I used the [Wayback/Archive.is] one from [Wayback/Archive] GitLab Pages examples / plain-html · GitLab as my site is purely static - Ensure you have a valid
index.htmlfile in thepublicdirectory of your repository, similar to [Wayback/Archive] GitLab Pages examples / plain-html · GitLab - When both 1. and 2. are committed in your repository at GitLab, then it will automatically be deployed to a docker container on
gitlab.io, which allows the outside world to visit your GitHub Pages sie, and the Let’s Encrypt Certificate to be generated (and prevents this error: [Wayback/Archive] GitLab Pages integration with Let’s Encrypt | GitLab: “Something went wrong while obtaining the Let’s Encrypt certificate”). - Under “Settings” -> “Pages”, add a new domain name to the repository: now it automatically becomes a GitLab Pages repository.
- When adding the domain, the settings page will show both a DNS
CNAMErecord and DNSTXTrecord; ensure both are applied on your primary DNS name server and replicated to all authoritative DNS name servers. - Save the new page.
- Check if the page is available on the new domain you added.
- Optionally under “
Settings” -> “Pages” enable the “Force HTTPS (requires valid certificates)” option and save.
TLS information
Note: I saved the TLS information – including certificates here:
- [Wayback] certcheckerapp.com/home?hostname=wiert.me.gitlab.io&hideResult=false
- [Wayback] Wildcard GitLab certificate with serial number
5B0C885BD0E0A1A52AD5C29Dfor*.gitlab.io, gitlab.io. - [Wayback] Certificate chain
- [Wayback] Wildcard GitLab certificate with serial number
- [Wayback] certcheckerapp.com/home?hostname=wier1.gitlab.io&hideResult=false
- [Wayback] Wildcard GitLab certificate with serial number
5B0C885BD0E0A1A52AD5C29Dfor*.gitlab.io, gitlab.io. - [Wayback] Certificate chain
- [Wayback] Wildcard GitLab certificate with serial number
- [Wayback] certcheckerapp.com/home?hostname=wiert.gitlab.io&hideResult=false
- [Wayback/Archive.is] Wildcard GitLab certificate with serial number
5B0C885BD0E0A1A52AD5C29Dfor*.gitlab.io, gitlab.io. - [Wayback] Certificate chain
- [Wayback/Archive.is] Wildcard GitLab certificate with serial number
- [Wayback] certcheckerapp.com/home?hostname=gitlabstatus.wiert.me&hideResult=false
- [Wayback/Archive.is] Regular domain certificate with serial number
3380904328FD4633E6CF27FE9B7D5BE25AEforgitlabstatus.wiert.me. - [Wayback/Archive.is] Let’s Encrypt issuer certificate with serial number
912B084ACF0C18A753F6D62E25A75F5AforR3. - [Wayback/Archive.is] X1 root certificate with serial number
4001772137D4E942B8EE76AA3C640AB7forISRG Root X1. - [Wayback] Certificate chain
- [Wayback/Archive.is] Regular domain certificate with serial number
More about the Let’s Encrypt certificates at [Wayback] Chain of Trust – Let’s Encrypt:
–jeroen
Posted in Cloud, Communications Development, Development, DNS, Encryption, GitLab, Hosting, HTML, HTTPS/TLS security, Infrastructure, Internet, Internet protocol suite, Let's Encrypt (letsencrypt/certbot), Power User, Software Development, Source Code Management, TCP, TLS, Web Development | Leave a Comment »
Cryptosense Discovery
Posted by jpluimers on 2022/03/15
This is cool: [Wayback] Cryptosense Discovery:
Free tool that discovers security configuration errors in SSH and TLS servers and explains how to fix them. Supports STARTTLS and can also scan HTTPS, POP3, IMAP and SMTP servers.
It gives you a list of servers a target domain uses (for purposes like web, email, etc) that can have external encryption enabled, then allows you to test these.
The list by default has only servers within that target domain enabled, but you can optionally include other servers (for instance if a domain uses a third party for their SMTP handling).
Basically it is the web-counterpart of a tool like testssl.sh (which I have written about before).
Found while checking out how to test the MX security of a domain using [Wayback] testssl.sh as I forgot the syntax, which in retrospect is dead easy as per [Wayback] tls – How to use testssl.sh on an SMTP server? – Information Security Stack Exchange (thanks [Wayback] Z.T.!):
…
testssl.sh --mx <domain name>works fine.
testssl.sh -t smtp <ip>:25and
testssl.sh -t smtp <ip>:587also work fine.
Note that not specifying the port assumes port 443, despite specifying protocol
smtp. That doesn’t work.…
Also, you might try discovery.cryptosense.com which does the same thing only better
That website is made by the cool people at [Wayback] Cryptosense.
Both are a lot easier than the alternatives described in [Wayback] Blog · How to test SMTP servers using the command-line · Halon MTA: using nslookup and dig for determining the affected hosts, using nc or telnet for testing basic connectivity, using [Wayback/Archive.is] openssl s_client to test TLS, and [Wayback/Archive.is] smtpping for measuring throughput.
In addition to the above tools mentioned in the blog, I’ve also used
sendEmail(note case sensitivity),ehlo-size, andswaks.
This is what I tested:
- [Wayback] Cryptosense Discovery: clientondersteuningplus.nl
We found these machines for
clientondersteuningplus.nl. Select those you would like to scan:clientondersteuningplus.nl185.37.70.68localhost.clientondersteuningplus.nl127.0.0.1pop.clientondersteuningplus.nl5.157.84.75These machines are also used by
clientondersteuningplus.nl. They seem to be managed by a third party:…
–jeroen
Posted in *nix, *nix-tools, Awk, bash, bash, Communications Development, Development, DNS, Encryption, grep, HTTPS/TLS security, Internet, Internet protocol suite, Power User, Scripting, Security, SMTP, Software Development, SSH, ssh/sshd, TCP, testssl.sh, TLS | Leave a Comment »










