Handling processes / services on hibernation / wakeup in CentOS

Hibernation is a great feature on any computer. It allows for a temporary pause in execution in which the system in question can be unplugged, cleaned, modified, or moved.

But what happens when some services don’t play nice and fail to resume properly from sleep? Fortunately, Linux’s power management utilities provide the necessary functionality…

Maximizing Netgear WNDR4500v2 functionality with DD-WRT (USB, FTP, Samba, TFTP, Printer sharing)

The Negear WNDR4500v2 router is quite a beefy piece of hardware with advanced firmware, including plenty of features even for a maniac user like me.

I would most likely not have replaced it from day 1 however if it had one more feature that I absolutely needed: TFTP/PXE/BootP options for the DHCP server. There is where DD-WRT comes in…

Restarting USB subsystem in CentOS

After a long uptime specific (cheap) devices or components connected to the USB ports lock up or malfunction. Unplugging and plugging them usually fixes issues, but physical access to the system (especially a remote server) is neither always possible or desirable.

In cases like this, Linux (unlike Windows) can trigger a USB subsystem restart by deactivating and reactivating the USB controller(s).

Connect to a VPN server in Windows and Android

A VPN connection is still mostly regarded as “business solution”, only useful to connecting employees to the company network. But this is no longer true nowadays.

VPNs can be very useful in protecting the integrity and security of data transfers, no matter who the two communicating parties are. To learn how to set up a connection and connect to a VPN server…

Compiling libtorrent-rasterbar and qBittorrent on CentOS 6.5 x64

I finally found the proper uTorrent (wine/Server) replacement for Linux (preferably headless) systems – qBittorrent.

Unfortunately there seems to be no repository out there providing qBittorrent for CentOS 6, so I had to compile it from source – not the easiest task I have to admit.

Bash script to monitor and (re)start Webmin

Webmin (Virtualmin) has great service monitoring capabilities, restarting any failed services that it detects. Unfortunately, it cannot and does not monitor or restart itself it it crashes.

Still, since on (most) Linux systems it comes with a service manager, this can be used to check its status. The included bash script does this and restarts it if necessary…

Block outgoing SMTP from untrusted hosts with DD-WRT

One may find himself in the face the scenario of having to fix a friend’s infected computer and needing internet access to install/run cleanup utilities while at the same time trying to avoid spamming the internet and get the public IP blacklisted or even blocked.

Using a router running DD-WRT, this is easy to do using custom firewall rules…

Quickly view PHP’s memory_limit values for all virtual servers

When one needs to quickly check the individual PHP memory_limit value for a long list of virtual servers (presumably hosted by Virtualmin), going from folder to folder and reading the contents of the etc/php.ini file is one (loooooong) way of doing things. Fortunately, there’s an easier way, with the help …

WordPress incorrectly loads styles, scripts via HTTPS and the solution

I’ve recently stumbled upon the weird issue of Wordpress loading its styles and scripts via HTTPS although it wasn’t configured to use SSL. The website did indeed have a SSL certificate installed and usable.

I eventually found some useful information about Wordpress’ is_ssl() function…