firewalld – managing firewall from command line

In some ways, firewalld on systemd systems is easier to manage and configure than iptables.

Managing Firewalld and Configuring Rules

Now that we have firewalld running, we can get down to set the configuration. We can open ports, allow services, whitelist IPs for access, and more. In all of these examples, we include the –permanent flag. This is important to make sure a rule is saved even after you restart firewalld, or reboot the server. Once you’re done adding new rules, you need to reload the firewall to make the new rules active.

Add a Port for TCP or UDP

You do have to specify TCP or UDP and to open a port for both. You will need to add rules for each protocol.

Read More

How to install qbittorrent-nox [Note]

qBittorrent is a free, open-source, fast and lightweight P2P BitTorrent client written in C++ / Qt, available for Linux, FreeBSD, MacOS and Windows. qbittorrent-nox – bittorrent client based on libtorrent-rasterbar (without X support). I try to install on my Raspberry PI.

qBittorrent is included in the default Ubuntu software repository. You can easily install it by running the following command in a terminal window:

sudo apt install qbittorrent-nox
Read More

Install Samba on Raspberry PI

Samba is available in Raspbian’s standard software repositories. We’re going to update our repository index, make sure our operating system is fully updated, and install Samba using apt-get. Open a Terminal and type:

sudo apt update
sudo apt upgrade
sudo apt install samba samba-common-bin
Read More

Raspberry Pi Media Server – MiniDLNA

Before post, I wrote to you about how I tried to install Gerbera on a Raspberry pi. Now let’s try to install minidlna. Let’s do it.

First, I recommend updating and upgrading your raspberry pi. You can do this by using the following commands:

sudo apt update 
sudo apt upgrade

Once this is finished we can install the media server software. Use the next command to do this.

sudo apt install minidlna
Read More

How to I try to install Gerbera UPnP Server

Gerbera is a free open source, powerful, flexible and full-featured UPnP (Universal Plug and Play) media server. It comes with a simple and intuitive web user interface for easily configuring your web server.

We strongly advise using the packages provided by your distribution if available. Please see below for guides on how to install Gerbera on various distributions. I try to install to Ubuntu/Debian OS on Raspberry.

Read More

Postfix – subject, from and to log

This is a little trick for Postfix, it lets you log the subject, from and to of all the emails postfix sends (or which pass through it if you run it as a relay). It comes in handy when you need to debug an email issue and need to confirm your mailserver has sent the message.

First create the file /etc/postfix/header_checks and insert this into it:

/^subject:/      WARN
/^to:/           WARN
/^from:/         WARN
/^Subject:/      WARN
/^To:/           WARN
/^From:/         WARN
Read More

Notepad++ on Linux

Notepad++ is one of the popular code editors and the fact that most of the users run Windows, it is available for Windows only. Some Linux users have surely missed it. Good news is that Notepad++ is now (unofficially) available as a Snap package for Linux user. Though this Notepad++ Linux application is not natively developed for Linux platform and actually runs on Wine, it’s now a command (or click) away for you.

Read More

Removing EXIF Data From Images and Photos

Most digital cameras and cell phone add EXIF metadata to the images.
If you’re worried about the privacy, you may want to anonymize your images and photos by removing all the EXIF metadata.
In this small guide, i’ll show how to read and then remove all EXIF metadata, using Linux command line utility, named ExifTool. Read More

Enable innodb_file_per_table

innodb_file_per_table is by default ON Mysql 5.6.6 and onwards. There is plenty of stuff on Google about pros & cons ofinnodb_file_per_table.
This post details how to enable innodb_file_per_table on an existing database. Because innodb_file_per_table affects new tables only, created after innodb_file_per_table is enabled, we need to recreate old databases to force innodb_file_per_table on old tables and reclaim some disk space.

Backup First

Create a dir to take backups:

cd ~
mkdir backup
cd backup

Read More