pfSense, collectd, FQDNLookup not working

Just a quick one.

pfSense with a manual collectd-package installation, with a configuration named “FQDNLookup False” which still reports FQDN to collectd-masterserver.


Seems FreeBSD does stuff differently, so instead use “Hostname <hostname>” in the collectd.conf to enter the shortname.

Plex client borked on Android-phone

I just had an issue where Plex on my android-phone constantly nagged about synced items, claiming that the server needed updates before it could sync.

My phone also constantly tried to resync, then discarded the download, resynced, discarded, etc.
Data usage showed about 1tb of transferred data before I noticed.

Resolution was to wipe data from client, and re-authorize it.

Installing rTorrent/rutorrent under nginx

Start with a fresh and updated install of Debian Jessie.

# apt-get update && apt-get dist-upgrade

Then install some packages:

# apt-get install nginx rtorrent php5-fpm php5-cli curl git-core

Then create a new user, so that you don’t act silly and run everything under root.
(I use a dedicated vm, so I already had a user created during the install phase.)

# editor /etc/nginx/sites-enabled/default

upstream php-handler {
server unix:/var/run/php5-fpm.sock;
server {
listen 80;
server_name download.internal.local;
fastcgi_buffers 64 4K;
root /var/www/html;
index index.html;
error_page 404 /index.html;
location /RPC2 {
include scgi_params;
scgi_pass unix:/tmp/rpc.socket;
location ~ ^/(conf|share|\.ht|db_structure\.xml|README) {
deny all;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass php-handler;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf|svg)$ {
expires 30d;
access_log off;

Save the file, dont bother restart nginx.

Now to autostart rTorrent on each boot:

# editor /lib/systemd/system/rtorrent.service


 ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
 ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent


Change User to the username you allocated, save and close the file, and enable the service:
# systemctl enable rtorrent


Change context to the defined user;
# su -l <username>
Create the session-directory:
$ mkdir .session

Create config for rTorrent
$ editor .rtorrent.rc

download_rate = 1248
 upload_rate = 256
 directory = /mnt/
 session = /home/CHANGEME/.session
 port_range = 9500-9500
 port_random = yes
 dht = disable
 set_dht_port = 9501
 peer_exchange = yes
 scgi_local = /tmp/rpc.socket
 schedule = chmod,0,0,"execute=chmod,777,/tmp/rpc.socket"
 encoding_list = UTF-8
 system.method.set_key =
 execute = {sh,-c,/usr/bin/php /var/www/html/php/initplugins.php &}

Consider changing directory, port-ranges and rates to your needs.
Save and close the file.

Change to web-directory, and checkout ruTorrent.

# cd /var/www/html/

# git clone .
(if this complains that the dir is not empty, do “# rm index.nginx-debian.html” first.)

When done, reconfigure ruTorrent for socket-communication:
# editor conf/config.php

Comment out $scgi_port and $scgi_host.

$scgi_port = 0;
$scgi_host = "unix:///tmp/rpc.socket";

Also fill in the path to curl ( /usr/bin/curl ).
I also change topDirectory to the dir my downloads should go, makes for easier browsing. (remember the trailing /)

Fix some permission issues,
# chown -R www-data share/

Save and close the file, technically ruTorrent/rTorrent works now – but all plugins are enabled which will generate some errors, and they are technically not needed.

# sed 's/ user-defined/ no/g' conf/plugins.ini -i

#editor conf/plugins.ini
Enable the plugins you want by typing in the following:

enabled = yes

This enables the loadavg-plugin. (remove the ‘\’, for some reason wordpress

Reboot the case, and remember to open firewall. (by following this guide, that will be tcp/80, tcp/9500, and tcp/9501.

MDT LiteTouch WindowsPE x64 dnsmasq

Just a quick note, it works to boot an MDT LiteTouch WinPE x64-image with dnsmasq, using:

menu label ^Boot MDT-bootdisk
linux /memdisk
initrd /winmdtx64.iso
append iso raw



How to Install Windows 7 over a Network using Linux – PXE, DNSMasq, and Samba

Splunk systemd unit-file for debian Jessie

This one works with Debian Jessie.
Please note that after the first install, or after upgrades you have to start it manually to accept the license.

# editor /lib/systemd/system/splunk.service


ExecStart=/opt/splunk/bin/splunk start
ExecStop=/opt/splunk/bin/splunk stop
ExecReload=/opt/splunk/bin/splunk restart


# systemctl enable splunk.service

Vmware Perl SDK on Debian Jessie

The only thing I dislike more than RPM-based distros, is software thats only tested on RPM-based distros.

Do the following to install VMWare Perl SDK:

# apt-get install libconvert-units-perl libmath-calc-units-perl libnagios-plugin-perl libxml-perl libclass-methodmaker-perl libnet-ssleay-perl libcrypt-ssleay-perl libarchive-zip-perl libdata-dump-perl libsoap-lite-perl libssl-dev –no-install-recommends

Enter “vmware-vsphere-cli-distrib” after extracting the tar-file from vmware, edit “” and search for:

if ( direct_command(“cat /etc/*-release | grep -i ubuntu”) || direct_command(“cat /proc/version | grep -i ubuntu”) ) {

Change it to:

if ( direct_command(“cat /etc/*-release | grep -i ubuntu”) || direct_command(“cat /proc/version | grep -i debian”) ) {


After running, watch as the installer will ruin your package-manager by downloading stuff via CPAN manually.

Thats just lovely. 🙂

Installing paperless on Debian Jessie

I wanted to test installation of, but the instructions are “somewhat” unclear.
Here I am trying to document the process, so it might be usefull for someone later on.

First, having a requirements.txt is all great and dandy, but saying I need GNU Privacy Guard does not translate to which package, and a link to GPG’s homepage isnt very helpful.
Also, “apt-cache search gpg | wc -l” returns 72 packages.

Alright, enough said – lets do this. 🙂

Start slow, apt-get all the requirements (hope I got them all….) :

# apt-get install –no-install-recommends git libtiff-tools python3-pip python3-dev libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk unpaper imagemagick tesseract-ocr tesseract-ocr-YOURLANGUAGE

Please note the YOURLANGUAGE there, to find your language do this:

$ apt-cache search tesseract-ocr-| sort

# git clone /usr/src/paperless/
# cd /usr/src/paperless/

Copy the example-config, then edit it.
# cp /usr/src/paperless/paperless.conf.example /etc/paperless.conf
You have to change some stuff in the config-file, so do:
# editor /etc/paperless.conf
And edit:
PAPERLESS_PASSPHRASE, just set and forget – this should never ever be changed.
PAPERLESS_CONSUMPTION_DIR, somewhere your service user have access, I just used a subfolder in $HOME.

Then do

# pip3 install –requirement /usr/src/paperless/requirements.txt

(and poff, there goes management via apt. The packages dont exist with the correct versions in Jessie repos anyway, so well… This wouldnt have been pretty anyway.)


After that, do the following:

# /usr/src/paperless/src/ migrate


# /usr/src/paperless/src/ createsuperuser


Finally you run the software by starting the webserver, and the consumer.
First the webserver:
# /usr/src/paperless/src/ runserver &
(Obviously, remember to open tcp/8000)
And the consumer:
# /usr/src/paperless/src/ document_consumer

Then put pdf-files into the consumer-dir and watch some kind of magic happen.

To be honest, I wasn’t that impressed so I ditched the software at this point.
Therefore I doubt this guide will be updated in the future.

Configure Brother DCP-7055W under Debian Jessie

On a fresh machine, do the following:

# apt-get install cups sane sane-utils —no-install-recommends
(Theres two –no, in case wordpress touches the formating)

Surf to

(In case link dont work, go to Brothers support-site, search up your printer, select Linux as OS, and pick the “deb-edition”, then select “Driver Install Tool”)

Right click on “If your download does not start automatically, please click here.”, copy link.


Go to server:

$ wget

(that link might be old when you are reading this)

Then, as root:

# mkdir brotherprint; mv linux*brprinter*.gz brotherprint; cd brotherprint

# gunzip linux-brprinter-installer-*.*.*-*.gz

# bash linux-brprinter-installer-*.*.*-*

Follow the on-screen installation, don’t panic if it can’t find ia32-libs, its going to work great.

When you are prompted for a device URI, choose yes, select 9 (thats input of IP)

When prompted, insert the IP. (DNS does not work…..)


When finished, test the scanner by issuing the following command:

# scanimage -T

You should hear your scanner working now. 🙂