Wednesday, 16 August 2023

Google Domains Exits Beta... And Promptly Gets Divested!

Google Domains is on its way to the Google Graveyard, not long out of it's long "Beta" period. DNS is a pretty generic service, I didn't think Google's was the cheapest even but it had some easy tie-ins for other products (sites, blogger, etc). But looking at SquareSpace Domains pricing, it looks like it's going to be a price increase for less functionality so I will end up transferring it. We've changed DNS providers a couple of times so once this goes ahead, I will set that up... Probably with Hover because they're an old hand on the Internet (née Tucows), they're Canadian, they sponsor my favourite podcast Grumpy Old Geeks, and pricing is better than SquareSpace Domains. 

More on that transfer once that comes. 

Ciao 
Dom617b

Thursday, 17 November 2022

Autofs with SMB

 "autofs" software for Ubuntu and other Linux systems mounts file systems and network shares on demand and there are a couple key benefits to using autofs compared to fstab and other methods and I've posted before about Autofs and a couple tricks with NFS shares

  • File share does not have to be available on boot so faster boot times and fewer failures after restart
  • File share is unmounted when not in use reducing system resources on client and server side
  • Consistent abstraction of mounts is easier to maintain across systems

Giant caveat that Linux does not segregate permissions once a share is mounted. This is fine for single-user systems and also fine where systems are un-attended (i.e. servers) but really a big problem on multi-user systems that user a and user b can both access share Z once it is mounted and it is as the connected user.


The Ubuntu standard "autofs" package includes an "auto.smb" which dynamically configures the shares in most cases so long as credentials are available and some basic pre-work is done. This should work for generic needs but for file share specific configurations use the auto.misc instead

Required packages to work with SMB shares (i.e. on Windows) and mounting with the stock CIFS driver (i.e. same old driver in Linux).

 

    apt install autofs smbclient cifs-utils

 

The auto.smb file itself doesn't have to be configured, if you look in the file it advises what configuration to add to "auto.master" and how to setup credentials.

 

    # edit /etc/auto.master and add this line

    /cifs  /etc/auto.smb --timeout=300

 

    # create /etc/creds with restricted permissions

    sudo mkdir -m 700 /etc/creds

    # edit a file with the server name like /etc/creds/MYNAS

    username=myuser

    password=reallygoodpassword

 

    # restart autofs

    sudo systemctl restart autofs

 

As any user you should be able to list shares and access contents of any available share the configured user has access to.


    # shows all shares on the server (not hidden ones)

    ls /cifs/MYNAS

    # access files as normal within a share

    ls /cifs/MYNAS/MyShare

 

If file shares or the contents do not appear, check "mount" and system logs for hints what may be wrong. Biggest caveat I had had was that cifs-utils really are required and I'm pretty sure smbutils as well - out of the box autofs with the stock system drivers and packages may have been able to do SMB1 but SMB1 should be disabled on any file servers so yeah, need to get "cifs-utils" package which includes tools to work with the newer SMB2 and SMB3 protocols. 


Tuesday, 24 May 2022

Another Round?

 We eventually saw Google change their tack with The Return of the Google Apps Free Accounts. It was pretty unnerving to lose services which had been free for over a decade. Really the services are free anyhow: Email in Gmail, custom domains in Google DNS, cloud storage in Drive, basic web hosting in Sites and Blogger. Why wasn't there are a better migration tool? Google has been eroding the GA free for years and all we really needed was a migration tool to get like 80% migrated to Gmail etc and this push could have been more successful. But then again, how many users signed up for GA a decade ago and are still using it? I know we're free-loaders but really the "free" services are doing for Google what they're supposed to: Get users hooked on Google's suite of services.


</rant>

Dom617b

Sunday, 20 March 2022

The Party For Grandfathers' Free Google Apps Is Over

With the end of Google Apps free accounts I've been looking at what services end up where and Google is pretty well covering personal use with maybe a few asterisks particularly around email.

TL;DR 

Setup Email Forwarding in Google Domains by adding up to 100 email aliases.

Send an email from your alias in Gmail

  1. Generate your app password
  2. Add an email alias
  3. Confirm the address
  4. Change the "From" address
  5. Optionally set this address as default sending address once confirmed.

Use Google Sites or Blogger and add custom URLs and they will generate the DNS entries as needed.

<Rant>

Google Domains "is out of Beta" ... Uh what? I've been using Google Domains for a few years already and didn't realise it was a "Beta". It did mean they sent out promo codes to all their existing "beta" customers so we can get 20-30% off their regular price registrations

I took the opportunity to register a test domain to test out some of the changes for when the GA free accounts go away shortly. As far as DNS registration and hosting goes it's a pretty good offering. Not the cheapest, but does include WHOIS privacy, integration with website services, and up to 100 email addresses forwarded for free.

The website services is a handy integration including with free services both on Google Sites and on Blogger (i.e. this site). It automatically creates DNS records when you create custom domain. Maybe it's more intuitive for a lay person than an IT pro because on Blogger you click the option for "custom domain" and type in whatever you want and if it's in a domain under your account it just registers it? I guess? Not clear it doesn't tell you a lot which is maybe point - it's all very easy.

Email I was really struggling with because there seem to be a lot of variables. We're using plain old Gmail account and there's two parts to deal with custom domains: receiving and sending. The receiving side is simple - add an alias in Google Domains (or 100) and you're done. 

Sending is far more complicated which I chalk up to "we can't have nice things". In Gmail you can add an alias with another Gmail account and that setup is pretty easy "mymail1@gmail.com" can be added in your settings as an alias for "mymail2@gmail.com". To use an alias with a custom domain you have to give a mail server and you can use the Gmail SMTP but you need an app password. And you can only use an app password if you have 2FA on your account. And if you don't have 2FA you can use "less secure authentication". But that's a feature apparently getting dropped soon so if we follow all the caveats, it means you have to use 2FA and app passwords. There's Google docs all over the place - the above link in the TLDR I think has the necessary info. 

Compared to how easy it is to do one Gmail address as an alias for another this was a bit mind boggling to go through. I get it - Google wants to sell as many Workspace accounts as they can, and lots of other options just don't work in the 21st century because we ruined the Internet and Email with so much spam. 

Other options to consider 1) use a real mail client like Thunderbird and you should be able to specify your email and this is fine if you do this already or only infrequently care about sending as your custom email address 2) use own mail servers heck even Synology has apps to run mail services but still its pretty rubbish to deal with backups, certificates, spam blacklisting, etc. 3) pony up for Workspace which if this is work related its pretty cheap - but that's a bit silly for personal use (even Zoho and others). 

</Rant> 

If you made it this far you're either brave for reading that rant or clever for skipping it :) 

Ciao
Dom617b

Sunday, 5 December 2021

Restoring from Gmail Backup

 Migrating to a new Gmail email account is a lot easier using Google Takeout this Thurderbird Add-on ImportExportTools NG. I have been splitting up my email accounts so that I have several distinct accounts - more on that below. The gist was that in the past I was forwarding all mail into one account which I'm no longer doing but now I want to move all that old mail, ~30,000 emails, into a different mailbox. Recommendations online were to connect Thunderbird to the two accounts and move messages in batches but in practice Gmail times out these connections very quickly and the batches are way too small. Instead I ended up exporting my email and importing it - why Google does not offer an import of the format in which they export boggles the mind, and while it's possible I've simply missed proper screen where this can be done, somehow I think not. This seems to be one of those things that is easy enough, but not obvious and took a bit of searching. 

The easiest process I found was to use the ImportExportTools Add-on:

  1. Spring cleaning time of your old email! Newsletters and automated notifications that were being filtered to a folder go 💥, gone.
  2. Go to Google Takeout and export mail. This produces a ZIP file which you can extract and there is a single large MBOX format file
  3. Install  Thurderbird and the ImportExportTools NG add-on
  4. Import the MBOX as a local folder with ImportExportTools
  5. Re-Export the email from local folder to a directory of EML files with ImportExportTools
  6. Connect Thunderbird to your new email account
  7. Import with ImportExportTools "all messages from a directory" and import into your "All Mail" folder
  8. Wait.  ... Wait ... Ponder if you should have done more aggressive cleaning... And wait. My mailbox I think it ran at least 3 hours? Not sure, but a lot time, many hours.
  9. Tada! Go into your Gmail account and try a few searches and see if you got everything you expected.
This ImportExportTools is generic enough you could use it for any sort of mail service and I think I could have done the initial export with it instead of Google Takeout thus saving a couple steps. My confidence isn't that high that 100% of the email was coming across with the connection timeouts so I would kind of suggest sticking with Google Takeout to get the mail and go through the extra steps and also having the Takeout as a backup is a good idea regardless.

Really this stemmed from wanting to split from One Mailbox To Rule Them All, which I already was moving away from. I'm working with 4 mailboxes now.

A personal email address which I really only use with other people; friends, family,  like actual humans. Mostly, a couple exceptions but so few as to be trivial. This is on thenibble.org domain and I have a handful of aliases (yay for grand-fathered free Google Apps account).

A general email address I use for most everything - online services, loyalty points programs, emailing with contractors, the bank, etc. Some people call this a "personal assistant" in that it's handling everything outside your most personal emails. A lot of my other mailboxes forward into this one. This is where I wanted to move all the mail.

A junk email address particularly to get to websites where they require an email or registration to access whatever specific thing that I need and is probably a one-off and I really don't want to hear from them again. Basically any email into this mailbox, I flag the sender as Spam so it stays pretty clean but it is functional enough to pass a registration. Some people like using 10 Minute Mail or similar.

A second "personal assistant" email address but for the household. My wife and I sign up for Spotify - goes on the household mailbox. Also, fun spy-craft tip: you can use this as a secret message drop by writing a DRAFT email which is then read by the other person and then deleted. This way the message never went through all the delivery servers so there's no logs of it and there won't be multiple copies of it.

Ciao
Dom617b

Sunday, 8 August 2021

Some Bits to Remember About Synology Standard Operating Procedures

Since running the Synology at home for a while now, there's a few things that I wanted to note which aren't really intuitive and I don't do often enough to remember. 

Encrypted folders are setup in a couple ways which I touched on in Home NAS Encryption 

One uses a key file stored on a removable USB drive. I have it setup to mount automatically so that's okay... But I used a really old USB key because obviously I didn't need an 32GB key to store a 32KB file but it's flaky so sometimes the USB key isn't available and it doesn't mount until I wiggle the key and re-mount.

Second uses a passphrase so there's no way to mount automatically and whenever I reboot like after a DSM update I have to go back in.

To mount the encrypted share manually, whatever the case it isn't mounted automatically, it is found in control panel.
  1. Open Control Panel
  2. Navigate to Shared Folder
  3. Select the share with the closed lock
  4. Encryption menu
  5. Mount
  6. Provide passphrase (if applicable)
The other part of the S.O.P. is updating the DSM and package software, i.e. the most common cause for reboot :) It's all been really smooth so I try to do it all the time.

DSM 7.0 was released a little while ago and I left the major version upgrade just so that I wasn't among the earliest adopters. Ran the upgrade today and it was seamless so far and Synology provided some clear prompts on cleanup items like removing obsolete packages (like Python now part of DSM).

Ciao!

Dom617b

Friday, 23 April 2021

Now Certified

Passed my Microsoft Azure Fundamentals certification this week and this is my first Microsoft exam. My primary resource was Microsoft Learn where there is a lot of material broken up into 30-60 minute lessons including some labs. Also used the practice tests and did those many times before writing the cert exam itself. 



Tuesday, 30 March 2021

Passwords Passwords Everywhere

I seem to need passwords more and more often. They're so convenient! Couple methods I've been using depending on the lazy-vs-security trade-offs. 

Registering for websites online, Chrome or any browser can generate passwords. 

 For secure passwords I use KeePass

There's the old dummy password only used for the real junky junk that isn't worth protecting. 

Random.org password generator.

DuckDuckGo.com "pwgen" with or without "strong". Also for bonus lazy, I changed the search engine in Chrome to be "duck" for short so in the title bar I can type "duck pwgen 10". 

 Stay Safe!

 - Dom617B

Monday, 8 March 2021

Azure Fundamentals, PowerShell, and More

We have a big push at #dayjob to transition from traditional server operations to automation and Cloud so I've been learning new things and trying as best as possible to sweep out the cobwebs upstairs. Really want to be able to competently support my colleagues as it is going to be a very hard time for many. 

PowerShell was really what got me moving. I've been doing odds and ends scripts and finally got a couple books as to take things further. "Learn Windows PowerShell in a Month of Lunches" was really just to get a passable foundation to get into "Learn PowerShell Scripting in a Month of Lunches". By the time I got through those two books, I was using VS Code and GitHub and will definitely re-read some of those chapters to get a more professional level of coding practice. After reading those I wanted to learn more and starting using Microsoft Learn with a goal to get Azure Fundamentals certification and go from there. The material available so far has been great. Mostly in about 30 minute chunks. Lots of references available, some labs are available, and all free. I'm still on pretty basic stuff though feel like I'll plow through a lot. Azure is crazy huge - there are so many services and the global environment is absolutely gigantic. 

The Azure Fundamentals learning path lead me into another tangent to go through the learning path to build a .Net application with C#. The Azure path got to a point that one of the sessions was recommending as pre-requisites to have knowledge of API and WebAPI in C# and .Net and I do want to be able to get the best use out of labs that I can. My programming is really rusty, but having done so much in school, the pace of the early lessons are more frustratingly slow. My expectations are out of whack - like I'm learning basic syntax like variable declaration but then also what's a container anyways? 

It's been refreshing to be learning and be re-aligning my skills with the current world. 

Ciao 

Dom617b

Sunday, 22 November 2020

New Website Name: Dom617b

Welcome to Dom617b! 

At least if I've setup all the new names, redirects, and certificates. Otherwise, you're not seeing this for which I have only myself to blame. The process I think could have been simple and I'll add a few notes about where Google is tying in services.

  1. Go to Blogger Settings and change the name 
    1. Disabling HTTPS first may have made things a little easier as it was initially hard to follow the redirects while that was still changing
    2. Change the Custom Domain to the new name
  2. Update DNS and with Google Domains this is at least partially integrated
    1. In Google Domains, verify that the "synthetic record" is registered
    2. OR setup DNS CNAME pointing to ghs.google.com 
  3. Redirect old name to new and in Google Domains there is a forwarding feature 
    1. Remove the old CNAME
    2. Add a forwarding entry with settings as applicable
      1. 301 Permanent redirect
      2. Redirect full path (i.e. oldsite/page.html -> newsite/page.html vs to newsite/)
      3. Enable HTTPS redirection
  4. Wait - like a day or two
    1. New name was resolving fine within a few minutes really
    2. Redirects were almost instant
    3. HTTPS was the slowest part
  5. In Blogger Settings turn on HTTPS and redirect to HTTPS if not already done

Its long past time to move on from the online handle I was using in high school so here I am Dom617b! The 617b is what I use when I can't get my own name or handle when registering for some site so that ties in to the old part, plus "617" kinda looks like "bit" in 1337 and "b" for binary, so it all comes together as a Nibble handle. 

Ciao

Dom617b

Saturday, 26 September 2020

Home NAS Part 3: Encryption

 The Synology DSM supports creating encrypted file shares and I want to use this for backups as these can contain personal files. Initial setup seems pretty flexible as you can create a share with encryption or enable encryption on an existing share and you can use key files or pass phrases and there's a feature called a Key Manager with good documentation for DSM for all of these.

My setup is to use a removable device as a key store. 

It starts with setting up the Key Manager from the Control Panel under Shared Folders. From here you initialize the Key Manager and pick the USB device (otherwise internal) and set a passphrase for the Key Manager. 

Then start creating shared folders that use encryption and you can pick the key manager. This also lets you pick if you want encrypted folders to be enabled automatically on boot which would require leaving your external key manager device connected.

After that, you need to keep copies of your key store and keys somewhere safe in case you lose key store device.

Once all setup you can start using that file share and it is pretty much seamless. In Windows I removed the old file history backup target and re-added the new encrypted share. On the Synology I removed the cloud backup targets, moving the files to the new location, and re-adding the cloud targets using the new location. 

Stay safe 🔐

Saturday, 5 September 2020

Home NAS part 2: No Regrets? Let's Get Setup

 Following actually picking and buying a NAS in Home NAS Part 1 the initial setup of the Synology is of course very easy. If you don't get distracted by all the buttons and spend days and days with "what's it do? what's this do? what's this do?" 


First of all I should have gotten one of these 2 bay NAS *ages* ago and even the cheapest model would be fine. So I'll start with the list of things that are overkill in my setup.

  • Dual-LAN. I just don't have enough concurrent devices to ever possibly saturate my network and since everything is WiFi even if I did, that would still be below 1 Gb that a single link would do. But it does afford a backup in case of failing cable or network port so I'm still using it.
  • NVMe cache. If I can't even fill up the WiFis how could I possibly saturate the drives? I at least held back from the 2xNVMe which would add write caching as well as read caching. Current reported cache usage on the 500 GB NVMe? ~350 MB. While theoretically possible I might one day get a performance boost, does seem unlikely, don't it? It does reduce drive activity so I'll keep it in the theory that maybe the drives themselves will last longer.


  • 4 TB drives. Okay so I just went with a drive size I had in budget. After copying all the data I wanted on there, usage is ~450 GB (are we seeing a pattern yet?). Truthfully, the bottom-end purchase price isn't that far off and it does forestall having to ever buy new drives except as replacements. Of all the overkill things, this is the least controversial under the heading "storage is cheap"


  • Memory upgrade. Basically like the storage, I was building the spec and saw "oh, can upgrade memory, that sounds cool" and bought a DIMM for it. I think in theory I might eventually use some of that memory and the computing power in the device if I run Plex from there. Mostly I was paranoid that I wouldn't be able to get a compatible part in the future.
  • The DS720+ itself comes with a 4 core CPU. I... Well it's just faster okay? We are not taking any further questions at this time. 
This is to say this NAS is a miniature powerhouse relative to its task and purpose. I setup a couple initial shares, a couple accounts, and transferred all my files over. 

Right away file share was far more stable than either the USB drive I'd tried attached to the ASUS router and far more reasonable than running a full sized desktop to be running all the time. Also really so much better to consolidate storage from many places.

The DS Finder app on mobile is used during initial setup and for general admin. Its been great so far, which I kind of expect for modern devices (like ASUS routers). One tidbit is that during setup you setup an account and the first account is a general admin which I went back in later to add a separated admin user and demoted my own "normal" account. 

One awesome app on the Synology is Cloud Sync basically to pull down files from OneDrive and Google drive, and any number of accounts which gives me a real backup of all that data.

The photos stuff I'm not 100% keen on as it looks like Synology has been trying different things over the years and that's the one thing that's really long term retention so not too confident there yet. It's not like the files go away so I am trying the Moments app which is scooping pictures from my phone and uploading them to the NAS. I went through the Google Takeout process to harvest all my photos that are up there and copy them to the NAS, plus the computer, plus the laptop, etc. 

That's about as far as I've gotten so once I do start setting more up on there whether external access like to get files from mobile device while remote or Plex Server and dumping more multimedia on there, all kinds of cool stuff on there eventually.

Ciao

Sunday, 2 August 2020

Home NAS part 1: Biting the Bullet

After many years of wanting and putting off getting a dedicated Network Attached Storage, I have finally ordered a Synology DS720+. Literally just ordered it and it's not here yet, so this will briefly by about the "why".

Cloud storage is great including Google Photos to hoover up pictures and Microsoft OneDrive for shared files especially MS Office documents. Definitely the best if the free or paid tiers work for you but for me it was going to be too costly. I've been trying other ways like running a file share on an old computer but its too loud and takes too much space or hooking up a USB drive to my Asus RT-AC86U but it's SMB1 and acts weird. So a NAS - a dedicated device that will be compact, quiet, power efficient, feature rich and upgrade-able. 

Synology, QNAP, and others make a plethora of products and I rely on Dong Knows Tech and also on write-ups like this one on the whole current Synology + series on NAS Compares. I've used both Synology and Qnap at #dayjob and Synology I think is more for tinkerers and I do like to poke things with sticks.. 

How big a NAS? It really came down to that I know I will want to upgrade the hard drives in the future so I want the fewest possible and that I can get the capacity I want on a 2 bay unit. 

And then the model comparison - if you go on Synology's site and look at their products even limiting to 2-bay models only they have 8 current products. What the great mother of Fridays? It came down to that I will heavily use a NAS and the price differences were relatively small to go right to the DS720+. 

Alternatively, for something for backups and basic file sharing, people frequently sell their old NAS on Craigslist / FB Market. I wouldn't buy drives secondhand, they're the only components that routinely fail and every year someone else used them is a year less life they have. Otherwise, yeah buying a NAS second-hand would be great get a couple new drives, awesome. 

Time to go check my shipment status again...

Ciao


Tuesday, 7 July 2020

Windows Terminal Is The Best

Only been using Windows Terminal for 10 minutes and already it's clearly the best! I heard it from Kayla Cinnamon on RunAsRadio Podcast and right away installed it from the MS Store.

Tabs? Yes
Launches PowerShell? Yes
Does "cmd.exe" sux? Yes

RunAs Radio Windows Linux Subsystem with Tara Raj and Sarah Cooley also put me onto WSL which I now always advocate rather than running a VM (unless you really need one) or Cygwin (nobody needs Cygwin). The slick thing with Terminal was that it dynamically added a profile for WSL after I installed it!



Between these couple utilities, WSL and Terminal, many of us can shed all our Linux stuff; virtual machines, Cygwin, Putty, Term, WinSCP, etc. And be better for it.

Ciao 😎

Popular Posts