At the start of the Covid19 pandemic, on the day Boris Johnson advised everyone to work from home. One of my clients made an on the spot decision to follow the government’s advice and let the entire workforce work from home.
Making this decision so suddenly, without any testing on their remote capabilities caused the client some concern. The workforce is all MacOS based, They do not have a VPN setup, and they rely heavily on a couple of hosted applications on a server in their office.
Basically, before the pandemic, they had never worked from home at all.
I stepped in, and within minutes I had got their entire workforce working as if they were in there office, without them even knowing anything had changed.
How did we do this?
All of the client machines are using JumpCloud for authentication and other cool stuff. So using JumpCloud Commands, we installed ZeroTier and connected all of the client Macs to their newly created ZeroTier client Network (utilising the script below Please replace *ZeroTierNetworkID* with your network ID.)
# Script to download, Silent Install, Connect to the configured network and then clean up once installed ZeroTier # Writen by twitter.com/richhickson # www.RichardHickson.com #Make temp folder for downloads. mkdir "/tmp/ZeroTier/"; cd "/tmp/ZeroTier/"; #Download ZeroTier. curl -L -o /tmp/ZeroTier/ZeroTier.pkg "https://download.zerotier.com/dist/ZeroTier%20One.pkg"; #install DockUtils sudo installer -pkg /private/tmp/ZeroTier/ZeroTier.pkg -target /; #tidy up sudo rm -rf "/tmp/ZeroTier"; #Join ZeroTier Network /usr/local/bin/zerotier-cli join *ZeroTierNetworkID* #Confirm ZeroTier Address /usr/local/bin/zerotier-cli info exit 0
We then installed the ZeroTier Windows client on the Server that they connect to, connected it to the same ZeroTier network and assigned it a static IP address inside the ZeroTier virtual network.
We then went back into the JumpCloud console and created another Mac JumpCloud Command. This new command updates the macOS host file to point the internal hostname of the server to the servers new ZeroTier IP Address.
echo '192.168.192.10 server.internal.local' | sudo tee -a /etc/hosts
Carrying out this enabled the whole workforce to work as usual, without any problems within about five minutes of them all coming online at home the very next day.
All of this is to be used at your own risk. Any questions, please leave a comment below.