Nginx, PHP-FPM, SELinux and sendmail

Since I am a real master at forgiving things I am writing this one down. PHP mail function relies on sendmail but SELinux by default block webservers from sending emails, the usual error that pop-out is: cat /var/log/maillog"> --- sendmail[16328]: NOQUEUE: SYSERR(nginx): /etc/mail/sendmail.cf: line 0: cannot open: Permission denied Allow webservers to send email is as easy as editing the appropriate SELinux boolean: setsebool -P httpd_can_sendmail 1 Use sestatus to check SELinux booleans: …

Posted on

Compile LineageOS 15.1 for Oneplus 3 on Fedora

LineageOS in Android Oreo flavor is finally here, I guess it is time to update the guide I wrote a while back. Most of the stuff is exactly the same, for the sake of simplicity this guide will be pretty much a copy and paste of the old one with just some bits changed here and there. Required packages on Fedora are (rpmfusion repo must be previously installed): …

Posted on

Firejail and symlink pointing outside of home directory

I normally move /home/user/Downloads off /home/user to a secondary mechanical drive and then symlink it back to /home/user. Firejail for security reasons does not allow whitelisting directories residing outside of the home directory, the simplest solution I found is mount Download directory using mount --bind. sudo mount --bind /mnt/data/Downloads/ /home/user/Downloads To make the change permanent edit fstab: cat /etc/fstab --- /mnt/data/Downloads /home/user/Downloads none bind

Posted on

Free Suunto Ambit3 from the botnet

Suunto makes some solid sport-watches, problem is that the management software is comprised of a closed source synchronization program (compatible with Windows and OSX only) and some cancerous cloud web interface accessible directly from their website. Even putting aside my personal aversion for closed source software, it is clear that this approach is retarded because an internet connection is required to be able to download any kind of data from the watch. What if I don’t have any signal? What if I don’t want to upload my data to Suunto’s servers? Luckily some good lads reverse engineered the communication protocol used by the watch to speak with the PC synchronization client, and even more, they also wrote an open source Linux compatible tool that can be used to download data from the watch. This tool is called: Openambit The version included in Fedora 27 repositories is not up to date and does not support the Ambit3 Run I own, luckily the github version does. …

Posted on

AMD Ryzen, DDR4 Dual Rank and BankGroupSwap

If I had to guess I would say that more than 90% of AMD Ryzen based builds use Single Rank memory sticks. Finding any information regarding how Dual Rank DDR4 perform, how they react to overclock or even worse, what memory settings are the best is pretty much mission impossible. Since I use Dual Rank DDR4, because, face it, it is 2017 and 16 GB of RAM does not cut it anymore, I had to dig in unexplored territories to find out what the best settings are. What follows are my personal findings on the impact of BankGroupSwap setting on system performance. …

Posted on

LEDE/OPENWRT first run configuration guide

LEDE, formerly OpenWRT, is a free open source Linux based operating system aimed at networking hardware. Every time the system is upgraded to a newer version using the so called Sysupgrade BIN image every package the user manually installed gets lost; this makes the upgrade process very tedious especially if one does not properly write down all the customization he has made. I don’t use many custom packages but QoS, USB support and vnstat are a must have. …

Posted on

Zabbix and XMPP alerts

Zabbix should theoretically be able out of the box to send alerts via XMPP. For some reason this functionality does not work as intended, luckily it is possible to specify a custom script to send alerts; combining the aforementioned script with the Perl library sendxmpp is the easiest way to enable Zabbix from sending notifications via XMPP. $ yum install sendxmpp Create a bash script, this will be invoked by Zabbix to send notifications: …

Posted on

Zabbix server on CentOS 7 and SELinux

Zabbix is an open source resource and network monitoring system, more info: zabbix.com. The official wiki is missing some important bits regarding the installation of the tool on CentOS 7 systems. First of all, let’s add Zabbix repository and then proceed to with the installation of Zabbix and some required dependecies: $ rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm $ yum install mariadb mariadb-server httpd zabbix-server-mysql zabbix-web-mysql setroubleshoot Configure MariaDB Login to MariaDB shell, change root’s password, create a new database for Zabbix and add a new user: …

Posted on