Wednesday, 15 October 2025

 How to update WAZUH agent on Raspberry Pi's

Because the remote upgrade won't work from the WAZUH management console (because we explicitly disabled it from updating under normal apt updates) - 

sudo cat /etc/apt/sources.list.d/wazuh.list

#deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main

Uncomment that line, save, then run apt updates/upgrades.


Sunday, 12 October 2025

 SNMP Monitoring of Linux Machines

Download and install SNMP -  

sudo apt update
sudo apt install snmpd snmp

Edit your SNMP configuration file - 

sudo nano /etc/snmp/snmpd.conf


Example - 

# SNMP community string and access settings
com2sec readonly  [IP Address of SNMP Poller] [insert clever string here]
group MyROGroup v2c readonly view all    included  .1      80
access MyROGroup ""      any   noauth    exact  all    none   none

# setup info
syslocation [Location string]
syscontact  Me <example@email.address>

# open up
agentAddress  udp:161

# run as
agentuser  root

# dont clog the local logs with "connection from UDP..." messages:
dontLogTCPWrappersConnects yes

# fix for disks larger then 2TB
realStorageUnits 0

#Distro Detection
extend distro /usr/bin/distro


Restart or start SNMPD and ensure that it's set to run at startup -

systemctl restart snmpd
systemctl enable snmpd

Wednesday, 5 June 2024

How to get the UCTRONICS OLED working on your Raspberry Pi rack mounts.

Step 1. "sudo raspi-config" then choose Interface Options and Enable "i2c"

Step 2. git clone https://github.com/UCTRONICS/U6143_ssd1306.git

Step 3. cd U6143_ssd1306/C

Step 4. sudo make clean && sudo make

Step 5. sudo ./display

Step 6. Next 2 steps are to ensure this runs at start up every time. If you skip these then it will look like the display is working after a reboot but the second line will be stuck on one stat (mine was stuck on Mem for example) 

 "sudo nano /etc/rc.local" 

Step 7. Add the following below fi: 

cd /home/pi/U6143_ssd1306/C

sudo make clean

sudo make

sudo ./display &


(https://github.com/UCTRONICS/U6143_ssd1306) 

Tuesday, 4 June 2024

Flash image using Balena Etcher

 What a pain! PITA!

Got there in the end. This was me trying to flash a Raspberry Pi Lite image to a Samsung Pro Plus Micro SD card via an Orico USB to SD card adaptor. Brand new card and brand new adaptor as my old one was reading incorrect sizes on old SD cards.

Step 1. Disable Protected folder access in Windows Security settings. It was not enough for me to add a program-specific exception to the list. (Remember to turn this back on when finished!)

    

Step 2. If you have a half-baked failed etch written to your SD card, open up disk manager (start\run "diskmgmt.msc" and delete any partitions that are there - 

    
This might have been the crucial step?

Step 3. Reboot your machine. Not sure if this helped or not but my machine locked up completely and after I powered it down and back on again (and followed the previous 2 steps) I got a working etch so who knows!?



Step 4. Change your USB port to a decent one. I was using one on the top of my case. Not sure if that one was 1,2 or 3 but I didnt trust it so I used a blue USB 2.0 port on the back of the case, directly attached to the Motherboard, and this might have also helped. (this was actually what caused my PC to lock up and need a reboot in step 3 above... Worried I might have some dicky hardware now!?!)

Step 5. Turn Windows Protected Folder access back to "on". You need this! I need this. Everyone needs this!



Certutil - Built-in Windows utility to calculate file hashes

Run command C:\> certUtil -hashfile <PATH_TO_FILE> <HASH_ALGORITHM>


e.g.

 C:\Users\[user]>certutil -hashfile "c:\Users\[user]\Desktop\2024-03-15-raspios-bookworm-armhf-lite.img.xz" sha256

SHA256 hash of c:\Users\[user]\Desktop\2024-03-15-raspios-bookworm-armhf-lite.img.xz:

4fa99737265ac338a9ed0643f502246b97b928e5dfffa92939242e26e290638d

Monday, 3 June 2024

How to remove Hyper V boot "Files" from the Boot order (under "Firmware" menu in Settings)

(Courtesy of https://sandyzeng.com/hyper-v-remove-firmware-file-bootmgfw-efi/) 


Here is the simple way delete all the bootmgfw.efi file at once. Use powershell.

$VMName = "Your virtual machine name"
Get-VMFirmware -VMName $VMName |ForEach-Object {Set-VMFirmware -BootOrder ($_.Bootorder | Where-Object {$_.BootType -ne 'File'}) $_ }

Saturday, 8 March 2014

Simple way to get ASA 8.4(2) Working in GNS3

Copied almost verbatim from Leo Li (thanks):

1. Download the required files from the below address:

http://www.mediafire.com/download.php?ssadit26tl3llms

2. Configure GNS3 preferrences -> QEMU -> ASA with below settings

RAM: 1024 MiB
Number of NICs: 6
Qemu options: -m 1024 -icount auto -hdachs 980,16,32

Initrd: C:\ASA\asa842-initrd.gz
Kernel: C:\ASA\asa842-vmlinuz
Kernel cmd line: -append ide_generic.probe_mask=0x01 ide_core.chs=0.0:980,16,32 auto nousb console=ttyS0,9600 bigphysarea=65536

3. Activate the license using the below code:

activation-key 0x4a3ec071 0x0d86fbf6 0x7cb1bc48 0x8b48b8b0 0xf317c0b5