Alpine as docker host

Alpine is a super small linux distribution. I am using it for all my new VMs running a docker instance. Install alpine Download alpine (virtual edition) ISO from https://alpinelinux.org/downloads/ Boot ISO and login with root and no password. Start setup with setup-alpine command and follow instructions Add SSH Key apk add curl mkdir -p /root/.ssh curl -L https://<yourserver>/ssh_key > /root/.ssh/authorized_keys Install docker apk add nano nano /etc/apk/repositories Enable edge-community repository....

March 26, 2020 ยท 1 min ยท Anton Bracke

Mysql backup script

I recently created a new mysql backup script. It is compatible with local mysql-servers or can be used to backup the databases of a docker container. It will save on dump every hour and holds 6 of them normally and one every day, holding a complete week. I am running this script every hour via crontab: 0 * * * * /opt/mysql/backup.sh > /dev/null 2>&1

May 19, 2019 ยท 1 min ยท Anton Bracke

Asterisk with fail2ban

I recently started to add some security features to my asterisk server. One was adding a fail2ban jail. Because I have asterisk running inside of docker, I mounted my log folder and changed fail2ban (installed on my docker host itself) to use the message file (in my case: /opt/asterisk/log/messages) . Start by editing /etc/fail2ban/jail.d/asterisk.conf: [asterisk] enabled = true filter = asterisk action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp] %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp] banaction = iptables-multiport logpath = /opt/asterisk/log/messages maxretry = 5 findtime = 3h bantime = 1d Fail2ban needs a specific timestamp format and to prevent asterisk from creating GBs of logs I changed it to only log notice and error messages in the /etc/asterisk/logger....

February 2, 2019 ยท 1 min ยท Anton Bracke