Tuesday, 6 February 2018

The joys of bash - some light scripting for n00bs

There's a lot to be said for scripting in a sysadmin's life - indeed, if you don't do any scripting, are you even a sysadmin...?

I've slowly been learning bits of bash and various related Unix utilities that are useful for processing text files - like the copious log files FreeRADIUS spits out with all sorts of useful information. I like "just in time" learning - it's often the only learning I have time for...
A screenshot of a bash shell script.
In particular, I wanted to know whether certain users are abusing the system, by connecting far too many devices, and to have a count of unique devices running on our LAN for a measure of the popularity of our wireless system (and perhaps for some capacity planning).  We limit device numbers for various reasons, and devices must be registered (on paper) prior to connection - there are only n spaces on the form, so n+1 or more == breaking the rules. Sure, electronic NAC is the obvious next step, and re-investigating Packetfence remains on my list of things to do...

Looking through currently connected clients where more than n clients are simultaneously connected is a fool's errand, even if your wireless system has such a view (UniFi has one) - and it won't catch people who break the rules over the course of a day, or when you're not actively looking, or across two different manufacturers of Access Points. A 24 hour long RADIUS logfile record on the other hand... Well, that has a lot of potential.

Of course, processing of this kind is quite easily accomplished in a simple shell script...

Thursday, 1 February 2018

Poorly Documented Feature: Canned Responses in Delegated Accounts (Gmail)

It's no secret. We love Gmail. However, sometimes, there are features that don't get used much that are absolute "killer" features - but it turns out they're not always well documented.

A common scenario is creating generic "role based" accounts that receive large volumes of mail, and to then delegate access to this mailbox to several individuals to deal with the responses.

Of course, a lot of incoming emails means a lot of outgoing responses (often the exact same thing hundreds of times), and there's a really handy feature, Canned Responses, in Labs that makes this a pleasure.
Labs Canned Responses.
Thank you Googler Chad P,
bulk email responders LOVE you.
However, if you switch across to a delegated account, shock, horror!
No Labs!
Does that mean no canned responses in delegated accounts? No it does not (phew)...

Tuesday, 21 November 2017

Weak defaults in IIS 8 cryptography (TLS/HTTPS/SSL)

So, this isn't exactly a breaking news headline. IIS isn't the most secure web server in the universe. However, it came as a shock to get a "C" grade on testing our school's management information system portal on Qualys' rather awesome SSL Labs tester.

Even if you're not governed by things like GDPR or POPI, it should be a point of ethical professional practice to ensure there isn't a hole large enough to drive a bus through in your security infrastructure.

Fortunately, there's a really easy way of fixing this.

Monday, 23 October 2017

RTFM: Speeding up your (Fortigate) firewall performance

I was witness to the installation of the (yes, single) Fortigate 300C firewall the school uses, however, it was not my own configuration/installation/design, although I've maintained it for several years now.

We've been having intermittent issues with close to 100% CPU usage and a sort of live lock up where the Fortigate responds, but packets do not flow (some of the scanning engines (ipsengine, or ipsmonitor) monopolise CPU time and need to be restarted several times [three, that's the magic number - diagnose test application ipsmonitor 99 - and wait several minutes between attempts] - or the unit rebooted, with resulting network chaos). And packets, like the spice, must flow.


The "death knell" for the 300C was a member of senior management unilaterally decreeing (without asking IT) that a whole year of pupils could have twice as many devices - a year ahead of schedule, and before the planned replacement to deal with the load... So I've been looking for ways to eke out a little more performance until we can afford/acquire a replacement for it.

It turns out that one of the design decisions that was made was not ideal - it completely disables the use of the onboard dedicated traffic ASICs...

Unfortunately, schools need quite paranoid and intense filters, and this comes at a cost (in terms of power, and price!).

Friday, 15 September 2017

Linux Game Server Manager

One of the teachers at school has declared that "eSports" will now be a Thing at school; his dream is that we thrash our arch-nemesis (more resourced  [top ten most expensive schools in the country] and bigger [more pupils]) school across the valley during the annual inter-school sports day. Indeed, he even talked to the Headmaster about it, who was initially confused, but eventually gave it his (tentative!) blessing.

This then means we need to facilitate such things as "gaming"...



Thursday, 14 September 2017

Goodbye, eth0 - Hello enp4s0?!

Today, I got a small shock whilst installing a few services on a new Ubuntu Server 16 LTS (16.04.3)  instance on an old HP Proliant server we had lying about not doing very much in order to do something more useful with it.

Whilst installing and configuring shorewall (my go-to iptables firewall management tool on Ubuntu), each time I started it, it just stopped all external connectivity, despite having it "correctly configured".

After a few moments, I thought to just check that I did indeed have an eth0 and ran ifconfig - lo and behold, the cryptically name enp4s0 was my Ethernet interface.
/etc/network/interfaces also had an entry for this cryptic new device and lo - but nothing else.
Wait. What happened to eth0?

Wednesday, 26 July 2017

Goodbye, YouTube Video Editor...?

It's rare that Google do something anti-awesome.

Sometime late last year, I discovered YouTube has a basic (but well-featured) video editor built into YouTube - which has been there for a decade... They've recently decided to discontinue it, as of the 20th of September 2017 - which is the anti-awesome part. I'm sad, because I'd mentally flagged it as a "killer feature" to introduce to teachers as we start to go beyond the very basic use of GSuite for Education features.

The real killer of this change is that it was one of the few ways K-12 schools could leverage across several platforms - notably Chromebooks - to edit video for free.

Indeed, it seems to be one of the only options to edit video on Chromebooks, so schools that have gone heavily in for Chromebooks will be particularly sad. Later generation models that support Android apps may have a few options, but the limited storage onboard Chromebooks will make it hard for budding videographers!

Google Connect has a thread calling for the retention of the feature. You may want to upvote it!

Google cites poor uptake, but this is probably primarily because it's an obscure feature, and many people quickly graduate onto "better" software (or don't edit at all). Of course, schools with small budgets, and especially those with Chromebook programmes, will really suffer from this change, as video is a popular medium to enrich teaching, learning and project work. Perhaps being Flash-based is the final "death knell", but it's a shame they don't consider HTML5 or some similar framework - which would also open it up to iPads.

Please Google/YouTube, reconsider!