Configure Fail2Ban for permanent and persistent bans

If you’re running server, you probably know its exposed services are constantly being probed and attacks are being attempted against it. Fortunately, an extremely useful, nice and nifty tool is here to help: Fail2Ban.

Fail2Ban scans service’s log files for patterns defined as regular expressions and, if an offending pattern is found a certain number of times within a given time frame, the corresponding source IP is banned for a configurable time, using local firewall rules such as iptables.

Continue reading “Configure Fail2Ban for permanent and persistent bans”

Security & bug fix releases PHP 7.1.18, 7.2.6

Security & bug fix releases

http://php.net/ChangeLog-7.php#7.1.18

http://php.net/ChangeLog-7.php#7.2.6

The PHP development team announces the immediate availability of PHP 7.2.6. This is a primarily a bugfix release which includes a memory corruption fix for EXIF.

PHP 7.2 users are encouraged to upgrade to this version.
The PHP development team announces the immediate availability of PHP 7.1.18. All PHP 7.1 users are encouraged to upgrade to this version.

How to set up software RAID1 on a running LVM system (incl. GRUB2 configuration) (Ubuntu 18.04)

This guide explains how to set up software RAID1 on an already running LVM system (Ubuntu 18.04). The GRUB2 bootloader will be configured in such a way that the system will still be able to boot if one of the hard drives fails (no matter which one).

I do not issue any guarantee that this will work for you!

Continue reading “How to set up software RAID1 on a running LVM system (incl. GRUB2 configuration) (Ubuntu 18.04)”

How to Remove Query Strings From Static Resources in WordPress

When it comes to WordPress performance, this question comes up quite a bit, and that is how to remove query strings from static resources. Your CSS and JavaScript files usually have the file version on the end of their URLs, such as www.prado.lt/style.css?ver=4.9.5. Some servers and proxy servers are unable to cache query strings, even if a cache-control:public header is present. So by removing them, you can sometimes improve your caching. This will also fix that warning you see in GTmetrix and Pingdom called “Remove query strings from static resources.”

Continue reading “How to Remove Query Strings From Static Resources in WordPress”

Security & bug fix releases PHP 5.6.36, 7.0.30, 7.1.17, 7.2.5

Security & bug fix releases

http://php.net/ChangeLog-5.php#5.6.36

http://php.net/ChangeLog-7.php#7.0.30

http://php.net/ChangeLog-7.php#7.1.17

http://php.net/ChangeLog-7.php#7.2.5

The PHP development team announces the immediate availability of PHP 7.2.5. This is a security release which also contains several minor bug fixes.

All PHP 7.2 users are encouraged to upgrade to this version.

The PHP development team announces the immediate availability of PHP 7.0.30. This is a security release. Several security bugs have been fixed in this release. All PHP 7.0 users are encouraged to upgrade to this version.

DirectAdmin announced that all DirectAdmin and CustomBuild 2.0 now support MySQL 5.7

Hello,

DirectAdmin announced that all DirectAdmin and CustomBuild 2.0 now support MySQL 5.7.

Related changes done to DirectAdmin to support it:
https://www.directadmin.com/features.php?id=1840

It was actually added back in DA 1.52.0 (October 2017), while DA 1.53.0 is the current version, but wasn’t announced right away to give time for proper testing, which seems to all check out now.

MAKE SQL BACKUPS BEFORE UPGRADING see below.

CustomBuild 2.0 should automatically set the mysql_milestone_16=1 directadmin.conf value for you, so as long as CB2 does the upgrade, you should be fine.

To do the upgrade from an older MySQL version to MySQL 5.7, run:

Code:
cd /usr/local/directadmin/custombuild
./build set mysql 5.7
./build set mysql_inst mysql
./build set mysql_backup yes
./build update

#make a backup that wont be overwritten, rename the folder
./build mysql_backup
mv mysql_backups mysql_backups.`date +%F`

./build mysql
./build php n
service httpd restart

Related guide:
https://help.directadmin.com/item.php?id=240

If you’re running MariaDB, then switching to MySQL might not be 100% straightforward, as higher versions of MariaDB cannot be directly switched over. But (for example), if you’re running a working MariaDB 5.5, then switch to MySQL 5.5, then switch to MySQL 5.7.

[DirectAdmin] How to upgrade MariaDB 10.2.14 with custombuild 2.0

The MariaDB project is pleased to announce the availability of MariaDB 10.2.14 and MariaDB 10.1.32, both stable releases, as well as MariaDB Connector/J 2.2.3, the latest stable release in the MariaDB Connector/J 2.2 series, and MariaDB Connector/J 1.7.3, the latest stable release in the MariaDB Connector/J 1.7 series. See the release notes and changelogs for details.

wget https://downloads.mariadb.org/f/mariadb-10.2.14/bintar-linux-x86_64/mariadb-10.2.14-linux-x86_64.tar.gz/from/http%3A//mariadb.mirror.serveriai.lt/?serve -O mariadb-10.2.14-linux-x86_64.tar.gz
perl -pi -e "s#mariadb10.2:.*#mariadb10.2:10.2.14:fd03510308c0387497416d63ebfe8fb9#" versions.txt
./build mariadb