UCARP on Debian 10

In this example I will show what is needed to create a UCARP fail-over IP on Debian 10. In this example my service is BIND9, but ofcourse you can change that to anything you require.

  • Run apt-get install ucarp
  • Edit interfaces via nano /etc/network/interfaces.
    Config should look somtething like this;
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 192.168.0.212/24
        gateway 192.168.0.1
        ucarp-vid 11
        ucarp-vip 192.168.0.210
        ucarp-password password01
        ucarp-advbase 1
        ucarp-advskew 0
        ucarp-master no

iface eth0:ucarp inet static
        address 192.168.2.210
        netmask 255.255.255.0
  • mkdir /opt/ucarp
  • cd /opt/ucarp
  • Create the following 3 files;

start-ucarp (Match eth0, IPs and password to your situation)

#!/bin/bash
/usr/sbin/ucarp -i eth0 -s 192.168.0.211 -B -z -v 1 -p password01 -a 192.168.0.210 -u /opt/ucarp/vip-up -z -d /opt/ucarp/vip-down

vip-up (Match /24 to your subnet)

#!/bin/sh
/sbin/ip addr add ${2}/24 dev $1

vip-down (Match /24 and eth0 to your situation)

#!/bin/sh
/sbin/arptables -I INPUT -d $2 -j DROP
/bin/sleep 2 && /sbin/ip addr del $2/24 dev eth0
/sbin/arptables -D INPUT 1
  • Make all the files executable using: chmod +x /opt/ucarp/*
  • Create a service for ucarp using:
    nano /etc/systemd/system/ucarp.service
    that should look like this;
[Unit]
Description=ucarp Virtual IP Address Management
After=bind9.service

[Service]
Type=simple
ExecStart=/opt/ucarp/start-ucarp
RemainAfterExit=true
ExecStop=/usr/bin/killall -SIGTERM ucarp
ExecStop=/bin/sleep 10
TimeoutStopSec=30
StandardOutput=journal

[Install]
WantedBy=multi-user.target
  • systemctl daemon-reload
  • systemctl enable ucarp.service
  • Reboot the system for the settings to take effect.

You should be able to run service ucarp status to see the effect of the settings and also the current state of the machine;

Mar 03 13:58:57 dns02 systemd[1]: Started ucarp Virtual IP Address Management.
Mar 03 13:58:57 dns02 ucarp[356]: [INFO] Local advertised ethernet address is [00:11:22:33:44:55] 
Mar 03 13:58:57 dns02 ucarp[356]: [WARNING] Switching to state: BACKUP 
Mar 03 13:58:57 dns02 ucarp[356]: [WARNING] Spawning [/opt/ucarp/vip-down 

Windows icon locations

C:\Windows\System32\Shell32.Dll C:\Windows\Explorer.Exe C:\Windows\System32\AccessibilityCpl.Dll C:\Windows\System32\Ddores.Dll C:\Windows\System32\GameUx.Dll C:\Windows\System32\imageres.dll C:\Windows\System32\MorIcons.Dll C:\Windows\System32\mmcndmgr.dll C:\Windows\System32\mmRes.Dll C:\Windows\System32\NetCenter.Dll C:\Windows\System32\netshell.dll C:\Windows\System32\networkexplorer.dll C:\Windows\System32\PifMgr.dll C:\Windows\System32\PniDui.Dll C:\Windows\System32\SensorsCpl.Dll C:\Windows\System32\SetupApi.Dll C:\Windows\System32\wmploc.DLL C:\Windows\System32\wpdshext.dll C:\Windows\System32\DDORes.dll C:\Windows\System32\compstui.dll

Webmin install made easier

A small script to automate the installation of webmin and adding it to source.list.d. sudo apt-get install apt-transport-https gnupg2 wget -y wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add – echo ‘deb https://download.webmin.com/download/repository sarge contrib’ | sudo tee /etc/apt/sources.list.d/webmin.list sudo apt-get update sudo apt-get install webmin -y Or without sudo: apt-get install apt-transport-https gnupg2 wget […]

Update SharePoint STS certificate

Renew the current self-signed certificate using IIS via “Server Certificates”, right-clicking on the current certificate and running the “Create Self-Signed Certificate”. Export this new certificate by right-clicking it. Then run the following PowerShell script using PowerShell ISE with Administrator rights; .’C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\CONFIG\POWERSHELL\Registration\SharePoint.ps1′ $pfxPath = “your file here.pfx” $pfxPass = “your password […]

Create a custom install USB stick using DISM

Install a windows laptop and setup everything according to your wishes. On Windows 10 you will need to remove all the apps from MarketPlace before capturing the image with the following command in PowerShell: Get-AppxPackage | Remove-AppxPackage After you have done this open run: sysprep /oobe /generalize /shutdown Once this is done, boot into the […]