Saturday, 24 September 2022

Ping not working in WSL2 Kali Linux

 I found the answer here:

           sudo setcap cap_net_raw+ep /usr/bin/ping

Issues with WSL2 Networking

 WSL2 networking continues to be problematic, be it DNS not working or network connectivity being lost with the wider network. I also had an issue where WSL2 seemed to prefer a disconnected WiFi connection over a connected Ethernet one.

Things I have done:

1. Disable the unused WiFi Adaptor, this has prevented WSL2 from trying to use it.

2. Turned off Windows Fast Start - This is accessed from the power butttons options underneath power plan. Apparantly it helps fix issues if you shutdown\startup the machine with WSL2 rather than restart.

3. Configured static DNS for WSL2 machines. I created a /etc/wsl.conf file containing the following (replace the name servers with what you want): 
            [network]
            generateResolvConf = false
            nameserver 192.168.1.3
            nameserver 192.168.1.4

4. Networking still craps out but I find this network stack reset recommendation from stackOverflow helps:
            wsl --shutdown
            netsh winsock reset
            netsh int ip reset all
            netsh winhttp reset proxy
            ipconfig /flushdns
            Windows Search > Network Reset
            Restart Windows


Sunday, 27 March 2022

NALA v0.7 Relased

 I've been using NALA for a little while on my Ubuntu distros as it compacts the update process and makes it much more obvious what's going on than if you use APT alone.

Up until now, the "nala fetch" command wasn't working on ARM\Pi as it set some repo's that either had no, or broken arm packages. 

With v0.7, "nala fetch" now sets up the repos correctly so ARM\Pi users can make use of features like parallel downloads etc.

Find NALA on GitLab here.


Sunday, 30 January 2022

Unable to upgrade Google Apps Legacy to Google Workspace Starter with UK billing

 I had discovered by accident that the old free Google Apps Legacy edition which I've been using since 2013 was being discontinued this year and that I had to upgrade to at least Google Workspace Starter before the end of July this year or potentially lose access to the service.

I have four family members using this, so losing access to email and purchased apps\media would be a big deal, so I had to go through the upgrade process.

The problem was, every time I ran through the upgrade wizard, I was being asked for a US, rather than a UK billing address. I did not have that.

I posted a question on the Google community forums, and having run around in circles for a few days I had my post closed as the duplicate for another question, again with no real answers. 

I came back today to thankfully find an answer. It turns out that at the top of the page where you select you Workspace edition there is a country\currency selection drop down. It looks like this is easily missed as the page in the browser can be displayed slightly scrolled down with this option scrolled off the top:

Here's the post with the answer here.

Now, a small rant. 

I'm very grateful to Google for providing this service for the 9 years or so, and I certainly have no issues paying a fair price for the service. Not at all. It just doesn't seem very competitive to other options out there, so I get the distinct impression Google want the legacy apps account holders to disappear.

List price for Google Workspace Starter is currently about £4.60 per user, per month. So for my family of four, this is £4.60*4*12=£220.80 per year. Compare this against £79.99 for up to 6 users on Microsoft 365 and that is nearly three times the cost. You also only get 30GB on Workspace starter vs M365 family. I also get the latest MS Office desktop apps on M365 family as well...

The only thing that has stopped me moving for now is:

  • Upgrade is free until end of July 2022
  • Upgrade is half price until July 2023
  • You can't move apps\media purchases to a new account
I might be able to justify this July 22-23 at £110.40 for they year, but I will most probably have to move and sacrifice apps\media in 2023.

I'm going to head over to the Google suggestions community page ans suggest that Google create a Workspace Family edition, but I won't hold my breath. The last time I tried, I couldn't register because of some mainteance

Wednesday, 24 November 2021

Chia Daemon Not Starting

I have been busy recovering from a 5 * 16TB Segate Exos drive crash, and had just updated Chia to v1.2.11. 

After a reboot and an attempt to restart Chia, I was only getting two lines in the log file:
    1: Starting Chia Daemon
    2: Not Implemented

The Wallet remained stuck on a "Connecting" message.

Turns out the Chia Daemon port 55400 had been blocked by the WINNAT service.

It was confirmed by running the following command from an elevated CMD prompt: 
    netsh interface ipv4 show excludedportrange protocol=tcp

The following commands also ran from the same elevated CMD prompt fixed it:
    net stop winnat
    [Now stat Chia]
    net start winnat 

 Thanks to MrGreenApe and his post here:

Wednesday, 17 February 2021

How to change Microsoft 365 Channel from command line

Good article here on how to change Microsoft 365 without worrying about registry keys.

  1. Run a CMD prompt
  2. type cd C:\Program Files\Common Files\Microsoft Shared\ClickToRun
  3. To change to e.g. Current channel do the following
  4. Type OfficeC2RClient.exe /changesetting Channel=Current
  5. Type OfficeC2RClient.exe /update user
This allowed me to easy change form SemiAnnual to Current channel.

More details here: https://www.fmsinc.com/microsoft-office/change-office-365-channel.html#CommandPrompt

Tuesday, 22 December 2020

Prepare and create a RAID5 Array of 5 * 4TB Segate Barracuda Disks

 We need to prepare the disks as GPT labeled as they are > 2TB.

For each disk:

  • parted -a optimal /dev/sdx
  • mklabel gpt
  • mkpart primary 0% 100%
  • set 1 raid on
  • align-check optimal 1
  • print
  • quit

Create the array:
  • mdadm --create /dev/md0 --level=raid5 --raid-devices=5 /dev/sdx1 /dev/sdx1 /dev/sdx1 /dev/sdx1 /dev/sdx

In all of the above replace /dev/sdx1 with appropriates devices, e.g /dev/sda1 /dev/sda2 etc.

Tuesday, 8 December 2020

Restrict ASUS laptop charge to 60% in Linux

 Dual booting my ASUS TUF laptop between Windows and Ubuntu 10.

The tools supplied by ASUS with Windows allows the battery charge to be limited to a specified %, the most agressive being 60%, in a bid to preserve battery life. Most laptops that are docked keep the battery at 100% and this kills the battery.

Found a good answer here:

https://askubuntu.com/questions/1006778/set-battery-thresholds-on-ubuntu-asus/1230442#1230442

I didn't have enough reputation on the site to leave a like or comment so I'm showing my appreciation here.

I did install tlp using "sudo apt install tlp" but not certain this is required.

After issuing the command "echo 60 | sudo tee /sys/class/power_supply/BAT1/charge_control_end_threshold" and adding the line "@reboot root echo 60 > /sys/class/power_supply/BAT1/charge_control_end_threshold"  to /etc/crontab, the output of "sudo tlp-stat -b" showed the charge at 78% and that the charge now was 0mA. It still shows as charging in the system tray but the % remains unchanging.

The reason I am not certain that TLP is required is because all the kernal modules listed in "tlp-stat -b" are showing as inactive and laptop not supported.

I've just unplogged my laptop and will let the percentage drop to below 60%, reconnect to the mains and see if the charging stops as hoped.

Sunday, 22 November 2020

Getting Hyper-V to recognise a physical disk

 I'm running WSL2 and docker on my main machine and have noticed that even though Virtual Box will run, the reliability of the VMs is somewhat sub-par and often involves crashing.

I have taken to installing various Linux distros such as Ubuntu and Parrot on SSD drives in removable USB3 housings.

The main issue with installing Linux from USB boot media is the installation interferes with the Windows UEFI boot loader and can leave Windows unbootable without repairing this. However, if you do fix the Windows boot loader it stop Linux booting. There is probably a way to fix this but I haven't spent the time to do so yet.

My workaround has been to use Hyper-V to install Linux to a the removeable drive, however Hyper-V has an issue seeing the drive to add sometimes.

I found the answer here.

By following the proceedure at the bottom of the post, Hyper-V is able to see and add an SSD drive in a USB3 enclosure. This is limited to disks though, removable devices won't work in my experience.

Thanks to reid1000 you can follow the steps below:

  1. In Disk Management, offline the disk
  2. Right-click the disk and go to Properties > Policies tab
  3. Select the option "Better performance" then click OK. If prompted to restart your computer, click No.
  4. Again right-click the disk, go to Properties > Policies tab
  5. Select the option "Quick removal (default)" then click OK. If prompted to restart your computer, click No.
  6. In Hyper-V Manager, turn off the virtual machine. Then, open its settings and add the physical hard disk to the SCSI Controller.


Wednesday, 7 August 2019

Microsoft Teams Crashing on Startup\Sign in

Teams developed a crash on startup.
Saw various messages such as an Azure AD sign in failure whch s strange as we don't use Azure AD for local domain authenticaton.
We do use a centrally provided Azure sign in for Office 365 applicatons though.

Finally tracked down this article on the excellent Petri site:
https://www.petri.com/debugging-teams-clients

Gave the option to delete the Teams cache at %AppData%\Microsoft\Teams and this fixed the issue straight away.

The teams client did initially come up wth my AD logon, so perhaps it was trying to authenticate my domain logon against Azure?

Sunday, 24 February 2019

Boinc on Cosmic 18.10

I'm sufering from OPENCL failures on Ubuntu 18.10 running Boinc so will try these third party drivers:

https://linuxconfig.org/how-to-install-amd-radeon-drivers-on-ubuntu-18-10-cosmic-cuttlefish-linux

Saturday, 5 January 2019

Retroarch does not recognise my controller

Despite have autoconfig setup for input device, the Retroarch snap on Ubuntu 18.04 would not work with my cheap PS3 like controller.

Turns out this is a disconnect between the snap and USB gamepad\joystick support:
https://forums.libretro.com/t/retroarch-does-not-recognize-my-usb-controller-solved/16985

You need to connect the controls to the snap using:

  • sudo snap connect retroarch:raw-usb
  • sudo snap connect retroarch:joystick
Thanks hunterk!

Friday, 28 December 2018

Windows 10 unable to access SYSVOL and NETLOGON on 2008 R2 Domain Controllers


I found some help here:
Looks like the SMB security needs to be weakened to allow Windows 10 to access these shares.
Enable the following policy:
  • Computer -> Administrative Templates -> Network -> Network Provider -> Hardened UNC Paths
You can either put the following in "Show Values":
  • \\*\NETLOGON    RequireMutualAuthentication=0,RequireIntegrity=0,RequirePrivacy=0
  • \\*\SYSVOL    RequireMutualAuthentication=0,RequireIntegrity=0,RequirePrivacy=0
Or put an entry for each DC:
  • \\DCNAME    RequireMutualAuthentication=0,RequireIntegrity=0,RequirePrivacy=0

Wednesday, 26 December 2018

Linux Mint 19.1 as guest on Virtualbox 60

Same steps as this post, but no need to add repos:
https://blog.thefoleyhouse.co.uk/2018/10/ubuntu-1804-bionic-beaver-as-virtualbox.html

Essentially:

  • sudo apt update
  • sudo apt install virtualbox-guest-utils virtualbox-guest-dkms dkms linux-headers-generic build essential

Monday, 3 December 2018

Geo-location with Wireshark and Geolite2

Turns out Wireshark has built in ASN, City and Country geo-location using Geoip products. You can purchase a (presumably) more accurate version, or use the free version from here:
https://dev.maxmind.com/geoip/geoip2/geolite2/

More details on the Wireshark Wiki (GeoIP link appears broken):
https://wiki.wireshark.org/HowToUseGeoIP

You can get endpoint statistics:

And in capture: