Finding local extrema in Matlab and Octave via fminbnd()

octave_logo-small.pngI recently had to work on a Matlab assignment that required the use of fminbnd() to find local extrema. As I typically work on Octave rather than Matlab I ran into some problems getting my code to work within both programmes. As it turned out, Matlab and Octave handle the function slightly differently, so I thought I’d share my findings to save others some headache. First of all, some background information: fminbnd() is a Matlab/Octave function to find a local minimum of a continuous function within a specified interval … [...]

Block unauthorized OpenVPN logins using fail2ban

fail2ban.pngMonitoring a server can be a lot of work, but handy tools like fail2ban or logwatch make the task considerably easier. Fail2ban, for one thing, monitors services running on your system and blocks incoming connections from a certain IP addresses (using iptables or hosts.deny) when it detects a break-in attempt. It does so by analysing log files and acting upon suspicious events. These need to be defined using a regex filter, and while a great number of templates are already available for the most-used services, OpenVPN thus far has not been included. Setting this up isn’t too difficult, though … [...]