WebP-Images without Plugin

Automatically generate and serve WEBP-images with PHP

WebP is a modern image format which shines through its fairly small filesize. Google recommends through their PageSpeed Insights that all PNG- and JPEG-files should be served as WebP images instead. There are of course plugins to facilitate the automatic generation of WebP versions of existing images but a few lines of PHP code and a .htaccess rewrite rule is really all that is needed to automatically serve all existing PNG- and JPEG- images as WebP versions to browsers that support it.

Firewall Rules with (dynamic) DNS Hostname

Messing up firewall rules can lead to unpleasant results including locking yourself out completely.

Updating and installing new firewall rules on remote servers always comes with the risk of locking yourself out completely. Many server administrators have inadvertently lost access to their servers, including SSH access, at some point due to a moment of inattention. This article shows how to install a backdoor on your own server that can be used to regain access to a misconfigured server. The bash script showed can also be used to update firewall rules dynamically based on the A record of a domain, which is handy for someone with DDNS and a dynamic IP address.

Restoring proxied visitor IPs from Cloudflare

Restore Cloudflare proxy IPs

Proxy servers are a great tool. Be it for security, filtering, load balancing through multiple origin servers or origin shielding. Unfortunately, reverse proxy requests make it a bit more difficult to recover the original visitor IPs. This article shows how to securely restore visitor IPs through the use of the Apache module mod_remoteip.