Automatically restart Webmin/Virtualmin in case of failure

Running out of memory sometimes happens on swap-less VPSes, and it seems Webmin (together with its twin, Virtualmin) are among the first processes to die in out-of-memory cases.

Setting up a little script to check for and restart Webmin if it is no longer running is a pretty simple (workaround) solution – but should never replace the proper procedure of adjusting the settings or upgrading the VPS to avoid running out of memory in the future.

Directory listing failed in FileZilla with ProFTPd on Virtualmin

Everything appears normal in the FTP server’s log:
fr01-srv proftpd[5591]: 192.168.0.1 – USER testuser: Login successful.

However, in Filezilla things are different:
Error: Connection timed out after 20 seconds of inactivity Error: Failed to retrieve directory listing

Obtaining administrator access on Huawei HG8247H

My ISP upgraded my connection from VDSL to fiber and gave me new hardware to go with it – the Huawei HG8247H GPON. However, as I am already using a fully configured DDWRT-ed router for all my networking tasks, I needed to turn the Huawei into a media converter and pass the static IP to my second router – not the easiest task as it appears.

The Huawei my ISP uses comes with manufacturer firmware and blank configuration so the default logins of still work, but as soon as its WAN gets connected it grabs the configuration from the ISP and the administrator login changes.

Adding static DNS records on DD-WRT

Ever needed to manually control host/domain IPs using the hosts file? Well, good thing most computers have a hosts file, but what do you do with other devices that do not support such a feature.

If you’re running a DD-WRT router, by using DNSMasq the DNS change will work for all devices that connect to your router, including mobile devices.

How to exclude subfolder from password protection with .htaccess

You sometimes need to password protect a folder or an entire account/website from direct access. That’s easily done with the appropriate .htaccess file in the protected folder plus the mandatory .htpasswd file with the correct user and password combination(s).

But what do you do when you want to enable direct access to a subfolder of the protected folder?

Fixing Abduction! to work with Firefox 36+

Abduction is a great little Firefox extensions that lets you take image captures of websites. Unfortunately, changes added in Firefox 36 made the extension stop working and it now throws out an exception instead: “Not enough arguments [nsIWebBrowserPersist.saveURI]” nsresult: “0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)”

The good news is that there is a dirty fix for this problem by editing the extension itself.

Installing an IPP printer in Windows 10

Using a single USB printer on several computers isn’t the simplest task: you have to either connect the printer to each computer separately, share it from one (and start it up every time you need to use the printer) or, my personal choice, set it up on a Raspberry PI and share it with the world.

The information provided here covers the second half of the setup process – the client side of things…

How to fix “Invalid IMEI” error on some MediaTek devices

After flashing a different firmware with FlashTool you might discover that you’ve ended up erasing a custom partition that was holding factory preset configuration, including the IMEI value(s).

In this case the device will end up not being able to register to the mobile networks.