Raspberry Pi power saving (disable HDMI port and others) – the SystemD way

For a few year I have been playing with Raspberry Pi’s. I started off with a 1B, then moved to a a 2B and for some time am heavily using a model 3B as my monitoring (nagios) server while the 2B is being setup for other use (as well as a few Pi Zero’s being used for other things).

Since the switch to the 3B I started to have more and more issues with the SD card getting corrupt. Actually, it wasn’t the card itself but critical files tended to get corrupted, making the system unusable after a while – one of the reasons  I scripted the setup of my monitoring server using Ansible). Recently I found this discussion on stackexchange which hinted me on the root cause of my problems – the Raspberry Pi 3B really needs a 2.5A power supply to function correctly.

Continue reading “Raspberry Pi power saving (disable HDMI port and others) – the SystemD way”

MacOS Server Replacement #2 – Migrating PostgreSQL

As part of the migration of my MacOS Server to Linux the next service to migrate is my PostgreSQL engine. Although PostgreSQL had already been hidden in MacOS Server for some time, it still was included (as internal services like ProfileManager and Calendar and Addressbook Server depend on it.  Despite it being hidden, I had still enabled it (manually) and hosted my PostgreSQL databases on my MacOS Server for ages. Despite migrations sometimes being a pain (i.e. not automatic) this worked well so far, including integrating it with the MacOS Server way of using transaction logs for offline backups. (so I will also have to look for a new way to do this). Continue reading “MacOS Server Replacement #2 – Migrating PostgreSQL”

VMWare ESXi 6.5 Spectre patch available

Today I noticed that VMWare has released a partial solution for the Spectre security issue ( CVE-2017-5715), according to VMWare:

This ESXi patch provides part of the hypervisor-assisted guest mitigation of CVE-2017-5715 for guest operating systems. For important details on this mitigation, see VMware Security Advisory VMSA-2018-0004.3.

It can be downloaded from their site and is also available for the free ESXi 6.5 version, the file to download is ESXi650-201803001.zip, see also VMWare Knowledge Base article 52456. Installation is quite straightforward. Continue reading “VMWare ESXi 6.5 Spectre patch available”

MacOS Server Replacement #1 – Migrating MySQL to MariaDB

As part of the migration of my MacOS Server to Linux the first service to migrate is my MySQL 5.7 engine. Although MySQL is not part of MacOS Server anymore for a long time (and I had installed it separately), I will cover the migration here as 1) I still had it running on my MacOS Server and 2) the migration wasn’t smooth so decided to share my learnings here. Continue reading “MacOS Server Replacement #1 – Migrating MySQL to MariaDB”

Apple totally strips MacOS Server

Today I noticed that there was a new update for MacOS Server that had quite a lengthy explaination:

As per Apple Knowledge Base article HT208312, the once great Apple Server product as this fall will be reduced to:

  1. Profile Manager
  2. Open Directory
  3. Xsan

The rationale of this is, according to Apple:

In fall 2018, Apple will stop bundling open source services such as Calendar Server, Contacts Server, the Mail Server, DNS, DHCP, VPN Server, and Websites with macOS Server. Customers can get these same services directly from open-source providers. This way, macOS Server customers can install the most secure and up-to-date services as soon as they’re available.

Continue reading “Apple totally strips MacOS Server”

Signal Desktop stand-alone OS X Application

For quite some time I am an happy user of Open Whisper Systems’ Signal Messenger phone application as alternative to WhatsApp. The fact that this solution is open source and that the exchange of messages (and now also calls) is secure and that this can be verified by anyone are important and valuable. I use it on my phone but as I spend most of my time behind a laptop and still (call me old-fashioned) prefer a real keyboard over a touch screen I have been looking for a way to use it from my laptop as well. Continue reading “Signal Desktop stand-alone OS X Application”

“Hacked” due to security issue in WordPress 4.7.1

Today morning I noticed that my blog had been altered as it looked as displayed in the picture above. The first thing I did when I noticed this was to take my webserver offline until I could check what actually happened and to assess the impact of this breach of security. Fortunately the damage turned out to be very limited and easy to resolve so after a short research I was able to reconnect my webserver again and write about it. Continue reading ““Hacked” due to security issue in WordPress 4.7.1″

Happy New Year!

Happy New Year and best wishes for 2017!

It’s a new year so the design of this blog has been refreshed as well. As I wrote a few weeks ago, some important things changed in my private live. On the short time it causes some stress and will be distracting me, but I have no doubts that this will be only for a short time. For now it means that I will probably have some more time for this blog and will be posting more frequent again, how this will develop on the longer term is still unsure.

For now I still have some time off to spend on my family and IT… keep posted for some updates the coming days. Anyway again all the best for this new fresh year!

Mac OS X SSH Client asking for password after upgrade to Sierra 10.12.2

After installing of OS X (MacOS) Sierra update 10.12.2 I noticed that SSH connections started to ask for the password of my RSA key. This wasn’t how it worked before and not what I want (as I trust my MacBook Pro) as it is quite annoying.

For the current session the solution was quite simple, just run the command: ssh-add -A

There seem to be many discussions online in what is causing this (i.e. here) with strange theories and odd (or not working) solutions. As documented also here, the root cause seems to be that the upstream OpenSSH code has changed and that Apple’s developers are following the changes.

The solution is fortunately quite simple: just create a file called ~/Library/LaunchAgents/org.openssh.plist with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
    <key>Label</key>
    <string>Add SSH Keys to SSH Agent</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/bin/ssh-add</string>
      <string>-A</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
  </dict>
</plist>

And from the next login onwards your SSH key will be added to ssh-agent again.

Basic Line Performance testing with Cisco’s (hidden) TTCP command

For some time I have been looking for a way to do simplistic performance monitoring without the need of two linux (virtual) machines to use the obvious solution iPerf. The iPerf solution is fine for normal situations but not very practical to quickly test a connection between routers as it requires 2 additional machines and configuring them correctly for the networks they should be in.

It turned out that Cisco’s IOS has a ‘hidden’ command ttcp for exactly this purpose. This command ‘hidden’ as it is not visible in the command help and will not and not present in all IOS versions. Cisco states that it is a hidden, unsupported, privileged mode command that requires IOS 11.2 or higher and Feature Sets IP Plus (is- images) or Service Provider (p- images. However, Cisco stresses that the command’s availability may vary from one Cisco IOS software release to another (i.e. it may not exist in some releases). Documentation of it is available on Cisco’s  Test TCP (TTCP) manual page (from 2005 so quite old).

Obviously the command works great between two Cisco’s (I could quite quickly measure the performance of my test DSL connection and it measured an expected 1.8Mbit throughput over the 2Mbit DSL connection. But how about a Cisco router and another system? After a little searching I found the nuttcp command, which according to its homepage is available for *nix systems but unfortunately the binary version of it does not install on Mac OS X. Fortunately the Debian Linux distribution has a package available so it was easy to get it installed on a Linux box (will look into an OS X version later when I really need it). In ‘legacy’ mode this command is working fine with Cisco’s implementation and running it is as easy as starting ttcp on the router and answering the prompts:

Router#ttcp
transmit or receive [receive]:
perform tcp half close [n]:
receive buflen [8192]:
bufalign [16384]:
bufoffset [0]:
port [5001]:
sinkmode [y]:
rcvwndsize [4128]:
delayed ACK [y]:
show tcp information at end [n]:

ttcp-r: buflen=8192, align=16384/0, port=5001

The last line is confirming that the router is waiting for a connection) and on the other end starting:

nuttcp <hostname or ip address of router>

This runs the throughput test from the Linux client using the Cisco as a receiver.