Posts

Turn single disk ZFS to mirrored ZFS

 I wanted to add some redundancy by mirroring disk. So I did it. Notice "-s" in zpool attach command so resilvering is done sequentially.

Fix ZFS device names

So you screwed up and created zpool using /dev/sdb instead of /dev/disk/by-id/ata-* as a device? Then you tried to fix it and ended up with cryptic wwn- as device name. Here's dirty solution. Make sure to run those commands right after each other. Otherwise it will get imported back with wrong device names automatically -- before you have time to do it with correct names.

Repairing beeping Lenovo T440p

Laptop powers on but nothing on screen. This is often because eeprom (Winbond W25Q32FVSIQ, 32Mbit / 4MB, 2.7V - 3.6V, SPI/QPI) loses programming over time and one day laptop will simply no longer boot. At first it will blink some leds on keyboard and turns off. Then it will degrade to just beeping on boot.

Hiding Azure Enterprise App from users using az cli or PowerShell

Toggling "Visible to users" setting on portal adds / removes tag called HideApp.

How to get list of Azure service tags and IP ranges using az cli

Microsoft provides weekly updated list of IP addresses used by various Azure features as downloadable JSON file on their webpage. Automating download of it is however not supported and prone to breakage. Same information is now also available via Azure Service Tag Discovery API. New API is still in public preview state and list of IPs it provides is far less than downloadble file contains. So either list of IPs from API is tailored for your particular subscription or it is incomplete. Discovery API requires authenticated session to Azure so we need to create service principal and custom RBAC role to keep things secure. See you for more after the break.

RHEL7 / CentOS7 network interface going down once per hour

There's really bizarre bug in RHEL7 / CentOS7. Once per hour NetworkManager will remove IP addresses from ethernet interface after hitting some bug and triggering "link loss" action. Interface may come back by itself or may not. It does come back when you login as root on console as login triggers some repair action part via systemd...

Migrating user accounts from older Linux to RHEL7 / CentOS7

Another pointless change just to break backwards compatibility - RHEL7 and CentOS7 prevent users with uid lower than 1000 from logging in. This is bad when you're migrating accounts from existing Linux server where uids start at 500.

RHEL7 / CentOS7 with sshd on ports 22 and 443

Short version: Not as simple as you thought.

Tracking wired client behind Aruba AP

So you have setup with Aruba RAPs that bridge their wired ports to VLAN on controller. Web interface only tracks wireless clients so you have no idea what AP client with particular IP is connected to.

Scan Intranet for Windows PCs missing MS17-010 / WannaCry / NSA ETERNALBLUE patches

So you have used all you tricks to get MS17-010 fix deployed but how to confirm that every forgotten PC on your network is actually patched? We'll scan our intranet using Metasploit checking for this particular vulnerability. PCs with local firewall blocking SMB traffic will be missed, but those are not exploitable anyway due same firewall.

Backdoor and root shell on ZTE MF286

ZTE MF286 has built-in factory backdoor allowing root shell access on embedded Linux running inside router. However since we don't know RSA-2048 private key used for encrypting device specific password we're not able to use this. Which doesn't mean we won't have other means to gain root shell.

Locking custom LTE bands on ZTE MF286

My ZTE MF286 is running DNA firmware version B04. It's somewhat limited in LTE band selection, but that can easily be worked around with curl.

Inside ZTE MF286 router

ZTE MF286 4G router is built around Qualcomm QCA9563 soc with 802.11bgn, QCA9882 802.11ac wlan, QCA8337 gigabit switch and MDM9230 LTE chip. There's also tempting serial port knowing all components used are already supported by LEDE (that has replaced OpenWrt). Photos here .

Inside Huawei B315s-22 4G router

Huawei B315s-22 contains Huawei HiSilicon 6361 SoC, Realteak Ethernet switch and Broadcom WLAN. Not much to see, but some photos here .

Linux SNAT with per-connection source address from IP pool

When doing NAT with pool of addresses to choose from (instead of masquerading) Linux insists on always using same IP from pool for particular source IP. Often this is preferred, but not always. To workaround we need to patch kernel a bit.

Windows 10 audio playback fails over bluetooth

Quick google search reveals hundreds of posts having exactly same problem - pairing with bluetooth audio device works but there's no audio. Hundreds of posts with incorrect instructions to fix problem. You do NOT need to uninstall random devices, restart service etc. All you need is correct Bluetooth drivers - drivers NOT available on Windows Update.

Vectorworks 2016 SP4 crashes on startup with Intel HD graphics

Vectorworks 2016 SP4 keeps crashing on startup with fault in module IG75ICD64.DLL when running on Lenovo W540p laptop with Nvidia Quadro 1100M. This laptop has also built-in Intel graphics and troublesome DLL is part of Intel driver package.

Dell DW5560 and other Ericsson 3G WWAN modules with Windows 10

There's Dell drivers for Windows 10 but they fail to install. Reason is that you first need to upgrade firmware of Ericsson 3G WWAN module.

Convert Huawei E3372h-153 from HiLink/router-mode to Stick/modem-mode [ UPDATED 2016-09-02 ]

This is updated version of my original post. I purchased additional modem that's externally identical to old one but had different serial port USB ID (USB\VID_12D1&PID_1442&MI_00) missing from earlier driver pack causing original instructions to fail. I have also included latest Stick-mode firmware 21.200.07.00.805 I've found and corrected some incorrect information on original post. Modern Huawei USB LTE modems can be used in two very different modes. Default is HiLink mode where it functions as router doing NAT and other nastiness much like more traditional 4G routers connected over WLAN or Ethernet. Unsurprisingly default mode is HiLink, but luckily it can be changed to Stick mode getting rid at least one layer of NAT and related issues. Actually there's also third mode which is subset of Stick, instead of native NCM interface it uses legacy PPP over emulated serial port. This can be sometimes useful with older routers with USB port but you won't be able ...

Upgrading Huawei E367u-2 firmware

Trying to upgrade Huawei E367u-2 from old 11.810.09.00.00 to latest available 11.838.01.00.1131 ends up with error code 16. This one was easy to fix - flash first  11.810.09.33.00 and then to latest.