TCPDump commands

HTTP GET or POST commands on port 5000

tcpdump -i eth0 -s 0 -A 'tcp dst port 5000 and tcp[((tcp[12:1] & 0xf0)  >> 2):4] = 0x47455420 or tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504F5354'

Exchange Autodiscover with HTTP redirect method

Server 2012 R2
Create a new Website on the CAS “autodiscover-redirect”
create a virtual directory called “autodiscover”
Click the virtual directory then open “Http Redirect
enter the url of the exchange server e.g. “” (Must be HTTPS)
Ensure both “Redirect all requests to excact destination” and “Only redirect requests to content in this directory” are ticked
Test using either or a mobile / outlook client.

Useful gnocchi commmands

resource update -a customerID:"customer1" 729389e687504dbf8b2c4aead14a607c --type my_consumable_resource

resource show 4f42c5e60813488ea166206c5bfc10cd --type my_consumable_resource

resource search project_id=729389e687504dbf8b2c4aead14a607c

Script to enable fast-diff on an entire pool of images and rebuild the object-map

This script enables the requisite features on all RBD images in a pool to allow you to run rbd du and have it return a result quickly as opposed to having to calculate the size very time

rbd ls -p backup1 | while read line; do
  echo "$line"
  rbd feature enable backup1/$line object-map exclusive-lock
  rbd object-map rebuild backup1/$line
  rbd snap ls backup1/$line | while read snap; do
        export snapname=$(echo $snap| awk '{print $2;}')
        if [ ! $snapname == "NAME" ]
                echo "$line@$snapname"
                rbd object-map rebuild backup1/$line@$snapname

Configure MikroTik VPN using Radius and NPS on Windows AD

Configure NPS on a Domain controller:
(Based on Windows Server 2019)
Install NPS Role
open NPS admin console
Select “RADIUS server for Dial-Up or VPN Connections” and click “Configure VPN or Dial-Up
Select “VPN Connections” and click Next
Click “Add” and fill in details as required (IP must be the IP of the router)
Take note of the Shared Secret
Click next on the rest of the screens (add groups as required)

Note: Before users will be able to authenticate using Radius “Allow Access” on the “Dial-in” Tab for the user in AD will need to be selected as “Control Access throught NPS Network Policy” does not work at least for Windows Server 2016 and above.

on the Mikrotik:
Click “Radius” then “+”
Complete the following:
Service: ppp
Domain: domain
Address: IP of NPS Server
Secret: Password defined while setting up NPS
Src Address: The IP of the interface (Must match the IP Specified in while setting up NPS)

Add the following rule in the firewall:
chain: input, Action: Accept, Protocol: TCP, Dst. Port: 1723
chain: input, Action: Accept. Protocol: 47 (gre)