I recently moved a bunch of websites over to a VPS (likely the one you are reading this from). It runs Ubuntu with a LEMP stack.
I ran into some problems when I went to reconfigure my DNS Zones to reflect the change. The zones (combined) I created looked more-or-less like this:
1 2 3 4 5 6 7 |
NAME TYPE VALUE -------------------------------------------------- mydomain.com. CNAME vps.mydomain.com sub.mydomain.com. CNAME vps.mydomain.com othersite.com. CNAME vps.mydomain.com vps.mydomain.com. A 1.2.3.4 (my VPS's IP) @ MX ASPMX.L.GOOGLE.COM (plus the other MX records) |
…
There’s a lot of records pointing to vps.mydomain.com, and only one ‘A’ record for vps.mydomain.com that points to my VPS’s actual IPv4 address.
This way I just have to update the one record if my VPS’ IP address changes. Makes sense, doesn’t it?
I thought so, but could not make this configuration work. After some research, I learned that according to RFC 1912 s.2.4, a ‘TLD cannot be a CNAME’. When I adjusted the zone as below, it all worked again.
1 2 3 4 5 6 7 |
NAME TYPE VALUE -------------------------------------------------- mydomain.com. A 1.2.3.4 (VPS’s IP) sub.mydomain.com. CNAME mydomain.com othersite.com A 1.2.3.4 vps.mydomain.com. A 1.2.3.4 @ MX ASPMX.L.GOOGLE.COM (plus the other MX records) |
What’s frustrating is that both strategies actually seem to work when the NS records point to a cPanel server hosting the zone file, but do not when the zone is served directly by my registrar’s “free DNS hosting”. This led to an argument with my registrar/host where I declared that their DNS server was broken (when it was actually just following RFC strictly), and they maintained that there was “no way to have an A and an MX record in the same zone, which wasn’t right either. In the end, we were both wrong!
Monitoring and reporting 3G radio signal-strength (RSSI, dBm) on Mikrotik Routerboards
Monitoring a large number of Mikrotik Routerboards is easy using software and tools like LibreNMS and Oxidized, but it is unfortunately not possible to retrieve values for 3G/4G/etc signal-strength RSSI (in dBm) ... Read more
Reverse-engineering the IKEA "Ledberg" LED
This is an "Ledberg" LED downlight from IKEA: I really like it - the LED is a nice, warm white, it has a very high output (up to 3W) and the diffuser ... Read more