Kategoriearchive: Server


Use mollyguard to prevent rebooting the wrong server

Mollyguard detects if you are logged in using ssh when you try to reboot or shutdown (unfortunatly init 6 works) a server. In this case you have to enter the hostname to proceed with the shutdown. The installation is quite simple. Just use apt-get install mollyguard Afterwards you will be […]


secure MySQL-replication with stunnel 2

I use stunnel to secure my MySQL-replication. MySQL itself offers SSH, but it´s not so simple to install. If stunnel works on your sytsme, you can use it for much more daemons/ports (secure imap, pop3, http). With stunnel only the remote connects to the master server use the tunnel. Local […]


Simply disable IPv6

There are various possibilities to deactivate IPv6 on linux-systems. You can modify entries under /proc, experiment with the kernel modules or god knows what all. I prefer to add just one entry to the grub-option. So i can easily reactivate IPv6 with one step. ipv6.disable=1 After a reboot, the IPv6 […]


restart mysql master-master replication 6

If the mysql-replication is broken, there are two ways to fix the problem: skip the error rebuild the replication In some cases you could easily skip error. If you for example execute the same INSERT on both server. Skip the error Login into mysql as root: STOP SLAVE; SET GLOBAL […]


Nagios-Plugin to check the current version of clamd

I wrote a small plugin for nagios to check the current clamav-version. Setup nagios: define command{ command_name check_clamdv command_line $USER1$/check_clamdv $ARG1$ } define service{ use local-service host_name obelix.schaal-24.de service_description CLAMD Version check_command check_clamdv # if clamd is not located in /usr/local/sbin/clamd, use #check_command check_clamdv!/path/to/your/clamd check_interval 15 } check_clamd Download #!/bin/bash […]


mysql master-slave-replication 1

In a master-slave replication on the slave are the databases of the master 1:1 available. Changes performerd on the master are immediately available on the slave (as long as you don´t user master_delay). Thus, it is not a true backup solution. Master setup: Change the section [mysqld] in /etc/my.cnf. Make […]


gpg: decryption failed: No secret key 2

When decrypt a gpp-file (gpg-d file.gpg> file) i got the error-message “gpg: decryption failed: No secret key”. It’s funny, the key is certainly there. A simple chmod o + rw $ (tty) has helped. Apparently gpg has inside the su environment a few problems. Sure, you can also set the […]


Nagios-plugin for Hetzner FTP-Space

The robot of Hetzner`s, but I would monitor the utilization of the backup space with Nagios. My plugin for nagios requieres sftp for the ftp-server access. The setup for sftp ist documented very well here. The plugin is very quick&dirty and doesn´t match the requirements for nagios completly, but it […]