Today I learned: How to forward a port using ufw

For forwarding a port using ufw it’s necessary to operate on iptables rules defined in /etc/ufw/before.rules Add the following rules to before.rules -A POSTROUTING ! -o lo -j MASQUERADE allows the traffic to be discerned as though not originating from a nat. ! -o lo prevents the lo interface to be masqueraded and break DNS …

Today I learned: Fedora and HAProxy SELinux

I encountered a problem with HAProxy and SELinux. It seemed like the server wasn’t found and I was getting 503. On inspecting SELinux logs I realized certain changes must be made when working on a SELinux environment. I had no issues on other systems except RedHat family OSes. This configuration was necessary for me when …

Today I learned: Firewalld Masquerade & Docker

While using Docker on Fedora 34 I encountered an issue where my containers would not communicate properly. So I had a Docker Compose configuration with an internal network and a default bridge network. While I could ping the various servers from inside the containers, connections to various ports were failing. So ICMP traffic was up …

Today I learned: Activating Varnish cache for Magento 2

Today I will do my best to explain how to configure Varnish cache for Magento 2.4.2. I used the official Docker image for Varnish and built a simple Dockerfile along with a Magento recommended ENV value: The default.vcl file is provided below: As you can see it’s a very simple configuration for bootstrapping the service. …

Today I learned: Adding CKEditor5 to Voyager Laravel extension

Today I will show you how to integrate CKEditor5 in a custom Voyager form field. There are 3 basic steps we must follow to even have the new form field appear in the Voyager BREAD type selection. Create a controller handler which we will save in app\FormFields\CKEditorHandler.php 2. Register the controller in app\Providers\AppServicesProvider.php 3. Create …

Today I learned: Primary and Secondary Joins

While developing my app I had to shape the data I get from the SQLAlchemy in a simplified way. Given models Client, Order, Receipt, where Order is referencing Client and Receipt is referencing Order I wanted to access in a view only relationship all receipts directly from the Client model. The way this is done …