ejabberd XMPP server configuration guide

I will be keeping this post up to date to keep track on how to configure and mantain an ejabberd server working efficiently and secure. I strongly advise any reader to read carefully what is written here and not just copy-and-paste the configuration file. My blog also contains a bunch of other posts regarding ejabberd that are worth giving a look at, use the search form. Server CentOS 7.5.1804 x86_64 Erlang/OTP 21.1.1-1 x86_64 ejabberd 18.09 Client LineageOS 15.1 (Android Nougat) Conversations 2.3.5+fcr .:. Installation and initial configuration Download and install erlang (release numbers here may not be up to date): …

Posted on

ODROID-U3 network unreachable

This issue seems to affect not only ODROID-U3 but many other devices and seems to be present on multiple OS too (Arch Linux ARM in my case). What happen is that after some hours/days of intense network traffic (e.g. a torrent client installed on the board) the system logs are flooded with errors and a page allocation error occurs which results in a network disconnection. In my case the tool journalctl report a moltitude of smsc95xx 1-2:1.0 eth0: kevent 2 may have been dropped errors. The workarounds that should (time will tell…) solve the issue consist in creating a file named for example smsc.conf in /etc/modprobe.d and put in it the following string: smsc95xx turbo_mode=N Disabling turbo mode will prevent the network adapter from sending multiple frames at the same time, single file copy performace in my case is invariated (9.4 MB/s ~) with and without turbo mode and the errors from syslogs are completely gone. …

Posted on

Protect Transmission WEB GUI with nginx and HTTPS

I have this small Odroid-U3 board hooked to a 2 TB USB HDD that every once in a while is also used to download torrents. Since quite often I manage it with a device connected to the LAN via wi-fi I am definitely a bit more confortable if the web interface of transmission is encrypted. Like many other times nginx come in our help. – Arch Linux ARM is the OS used – First of all, edit the following two lines of transmission config file: …

Posted on

Interesting read on Samba 4

In the last month or so despite not having much spare time I spent a few hours reading an interesting book: Implementing Samba 4 It actually is more than a simple book, it is a well written step-by-step guide on how to install (on Debian 7, not that it makes much difference, the installation is really similar on CentOS for example), configure, manage and even migrate an existing Active Directory domain controller from Windows Server to GNU/Linux. It consists of 9 chapters each one covering the most important features of Samba 4; everything explained in the book is also integrated with code snippets, scripts and command line examples. I am sure this book will come real handy in case I will have to setup a GNU/Linux based AD domain controller. …

Posted on

Elantech touchpad and Mint 16

Today I installed Linux Mint on an Asus X551CA laptop. Everything was fine except Mint being shit and the damn Elantech touchpad being even worse than Mint. I will never understand why the fuckers at Canonical and whoever is in charge of Mint development are always 6 months late with important updates like new kernels with added hardware support. The damn Elantech touchpad is supported since kernel 3.12., too bad Mint is stuck with 3.11., so to make it working I had to manually install a newer kernel (version 3.13.9). Download the following packages… …

Posted on

Systemd mount volume at boot

Since fstab (even with <em>nofail</em> option enabled) doesn’t seem to behave too good when trying to mount at boot something that isn’t actually plugged in (like an USB HDD) I realized it was a good idea to write a small script to run at startup which will be able to handle the situation a bit better. Arch Linux uses Systemd and even though a rc.local file can be created I decided to take the opportunity to understand a little bit of how it works and write a mount script for it. Following what’s written here it seems pretty easy, just write a text file and put it in <em>/etc/systemd/system</em>: …

Posted on

Avahi on Arch linux ARM

From wikipedia: Avahi is a FLOSS Zero-configuration networking (zeroconf) implementation, including a system for multicast DNS/DNS-SD service discovery. Long story short: Avahi is used to resolve hostnames of LAN devices. I happen to have an ARM box on which runs a pretty minimal Arch Linux installation. Installing Avahi is pretty easy: [root@k* ~]# pacman -S avahi nss-mdns The latest version of Avahi (0.6.31-11) makes use of SO_REUSEPORT which is a new feature introduced in Linux kernel 3.9, the latest official Arch Linux kernel for my platform is 3.8.13.19-2-ARCH so when I try to start the service systemd reports the following error: …

Posted on

Nginx and password protected pages

To password protect a directory xyz and every file and subdirectory in it open the configuration file (nginx.conf or one of the virtual host configuration files) and add the following two lines: location /xyz/ { auth_basic "Restricted Area"; auth_basic_user_file conf.d/htpasswd; } htpasswd file must be encrypted, it can be created using a tool named htpasswd. [root@xenserver ~]# cd /etc/nginx/conf.d/ [root@xenserver ~]# htpasswd -b htpasswd user password

Posted on