Minecraft server in FreeBSD Jail

To run latest Minecraft 1.12.1 (as of this writing) within FreeBSD Jail you need few things. First of, you need to install Java 8: pkg install openjdk8 openjdk8-jre After Java is installed, you’ll notice that there’s a warning like: This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and procfs(5) mounted on /proc. If you have not done it yet, please do the following: mount -t fdescfs fdesc /dev/fd mount -t procfs proc /proc To make it permanent, you need the following lines in /etc/fstab: fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0 This obviously needs to be done on the host system level as it is not allowed within Jail....

August 28, 2017 · 2 min · Ivan Tomica

Sync messages across IRC clients with ZNC ClientBuffer plugin

One of the main reasons for setting up ZNC bouncer for me was to be able to have same IRC account on multiple computers and have messages synced across them. This isn’t “default functionality” so you need to install additional ClientBuffer plugin. To install the module on ZNC installed from binary package on FreeBSD you need to: Fetch the module fetch –no-verify-peer https://raw.githubusercontent.com/jpnurmi/znc-clientbuffer/master/clientbuffer.cpp Build module znc-buildmod clientbuffer.cpp Copy module to ZNC library directory cp clientbuffer....

August 13, 2017 · 1 min · Ivan Tomica

ZNC with Let’sEncrypt

I’ve recently set up ZNC - an IRC bouncer, to help me stay logged in on IRC. Although I’m not yet done with the whole setup, I’ve decided to add a valid certificate. Of course, I use Let’s Encrypt for this purpose. To issue a certificate you can use: certbot certonly --standalone -d DOMAIN -n -m YOUREMAIL --agree-tos Certificate for the ZNC service on FreeBSD is located at: /usr/local/etc/znc/znc.pem and it’s structured like:...

August 1, 2017 · 2 min · Ivan Tomica

Ezjail not creating snapshots

July 18, 2017 · 0 min · Ivan Tomica

Setting up timezone in FreeBSD

This one is fairly simple. All of thee zone info files are located in /usr/share/zoneinfo/, divided by region. I’m in Croatia so setting up time to be the same as in Zagreb is done by sym-linking appropriate zone file to /etc/localtime: ln -sf /usr/share/zoneinfo/Europe/Zagreb /etc/localtime As I use jails on FreeBSD, to avoid setting this up on every single jail, I have flavor within ezjail defined which has default settings that I usually have on all jails....

June 25, 2017 · 1 min · Ivan Tomica

Using Ansible with FreeBSD

Using Ansible with FreeBSD as a managed node might not be straight forward as using some Linux distribution as, by default, FreeBSD doesn’t have Python interpreter installed which is needed for remote command execution in Ansible. To bootstrap the FreeBSD host you first need to install python and needed dependencies with raw module: ansible YOURHOST -m raw -a "pkg install -y python py27-simplejson" This will provide you with Python interpreter, but since it is installed from package/ports it will be installed in /usr/local/bin/python while Ansible expects it to be in /usr/bin/python....

June 20, 2017 · 1 min · Ivan Tomica

GNU Screen tips – Managing regions

Although I use tmux primarily for my “multiplexing needs” I hop into screen from time to time as well. Below are few tips for managing regions inside of GNU screen. Your basic screen window probably looks somewhat like: Ignoring hardstatus settings you basically have one session and one window inside of that session. To split that window in half by vertical axis you can use following combination: Ctrl+a | You should now get something like:...

June 15, 2017 · 2 min · Ivan Tomica

Installing OTP for pass (password-store) on OpenSUSE

I’ve been using password-store utility for saving my passwords in GPG encrypted files. Since I’m also using 2 factor authentication I’ve opted in to use pass-otp as a convenience. As this extension is not in the official OpenSUSE repositories you will need to install it manually. If you’re reading this I guess you already have password-store program installed. If so, you can proceed installing pass-otp extension right away. To do that, use:...

June 7, 2017 · 1 min · Ivan Tomica

Using KDE Wallet Manager and kwallet-query

I’ve been using mutt for reading my emails for some time now. It is simple, fast, configurable, and yeah, did I mentioned it is a command line email client? Anyhow, only thing I have been fighting with was on how to securely store password without putting it to .muttrc file (which is plain text file). When I used to use GNOME I have used Seahorse while on the command line I’ve used secret-tool for fetching the password....

June 4, 2017 · 2 min · Ivan Tomica

Install SVN PHP module from PECL on EasyApache 4

Basically, something is broken while attempting to install SVN module for PHP via “Modules installer” option. To manually install extension follow these steps: Download the SVN PECL package: wget pecl.php.net/get/svn-1.0.3.tgz Extract the package: tar xzf svn-1.0.3.tgz Run phpize for appropriate PHP version: /opt/cpanel/ea-php56/root/usr/bin/phpize Configure with appropriate PHP configuration: ./configure –with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config Edit the Makefile to add following CFLAGS: CFLAGS = -g -O2 -std=c99 Compile and install extension: make make install Create configuration for SVN extension: vi /opt/cpanel/ea-php56/root/etc/php....

May 23, 2017 · 1 min · Ivan Tomica