Sunday, November 25, 2012

Swatch and SSHblock SlackBuilds on SlackHacks

After conducting more thorough testing on the SlackBuilds for swatch and SSHblock this morning, finally i pushed those two packages on my SlackHacks repository as well as to SBo project.

Since this is my first time building packages that utilizes Perl modules, i hope i did it correctly. Well, at least it didn't break my system during my own testing on my desktop. Anyway, i would like to give some tips prior building those two packages.

1. Upgrade your CPAN modules to the latest version. This could take some time to complete and not all of them can be upgraded as some of the modules requires a development version of Perl. You can ignore those packages. You can do this by performing this commands on your terminal (as root user):
  • perl -MCPAN -e shell
  • upgrade
 2. Swatch requires 3 PERL modules, and you have two options: 1) install using CPAN or 2) install using SlackBuilds. Two out of three modules are already available on SlackBuilds, and the last one was submitted before i submitted swatch, but that could take some time to be approved as well.
Suppose you decided to install using CPAN, from the previous cpan prompt, you can just install the dependencies using:
  • install Date::Calc
  • install Date::Manip
  • install File::Tail
3. For SSHblock, you might want to review the pre-defined configuration ( that i made. It was made based on default installation using the source package (not by the SlackBuild). Suppose you want to change it, there are five entries that you should change:
  • never_block_these (IP addresses that won't get blocked)
  • history_file (location of the tracking file of the blocked IPs)
  • send_email (your email address)
  • email_level (how many counts before the application send you an email)
  • myhostname (your host name)
Suppose you change the history_file variable, you must update the location in rc.sshblock file,, and sshblock.SlackBuild as well. If you don't mind with my choice, just use the default path (/etc/ssh/block-history).

When you have done all above tips, you are ready to compile and install swatch and SSHblock using my SlackBuild. Give it a try and let me know if something goes wrong.