Posts Categorized: linux

IPTables Custom Chain for SSH access

I wanted a custom IPTables firewall chain to allow SSH access to a machine. The idea is that users hit a web page that adds their dynamic IP address to a list and then a script inserts that IP address into IPTables to allow SSH access. I achieved this as follows. In /etc/sysconfig/iptables I added:

Read more »

Adaptec Hardware RAID controller on Sun 4150

On our Oracle Sun x4150’s the Hardware Raid can be checked after installing the StorMan software which is available (as StorMan-6.40.x86_64.rpm)  in the software bundle for x4150s available after logging in to the Oralce support website and locating the downloads for x4150s. The download is pretty big (931MB) when the 39MB RPM is all you are… Read more »

Keeping Services Alive with Monit

On CentOS install monit as follows:

Make sure it starts automatically:

The main configuration file is at /etc/monit.conf but this file loads in any files under /etc/monit.d which is where we will place our files. First comment out the following sections in /etc/monit.conf as we will be defining this in the next step:… Read more »

Monitoring Child Internet Use on Ubuntu

So I wanted to keep an eye on what my daughter was up to on facebook etc. In addition to using OpenDNS and the Nanny parental control software in the Ubuntu Software Center I would like to use DansGuardian but that might take a little more time. One of the things I have done quite… Read more »

Skipfish on CentOS

I’m using CentOS 6.2 and needed to install the following dependencies before Skipfish would ‘make’: yum install pcre-devel openssl-devel libidn-devel libidn2-devel Some of the errors listed before this included the following:

 

Photoshop CS5 on Linux

Great instructions for installing and running Photoshop CS5 via Wine: http://www.makeuseof.com/tag/idiots-guide-installing-photoshop-cs5-ubuntu-1004/    

My Raspberry Pi has Landed

So my Raspberry Pi arrived a few days ago and I have now managed to get it out of the wrapper. After realising that I should have been using an SD card in the dedicated SD Card slot rather than trying to boot from one of the USB ports I was up and running. On… Read more »

Web Screenshots with Xvfb and Khtml2Png2

To get that headless Linux server capturing screenshots of web pages we need: Xvfb e.g. apt-get install xvfb Khtml2png2 (and dependencies) After installation of the above the steps are below and I wrapped it up into a PHP script which also did some database tasks to keep records of the screenshots. 1.Check if the Xvfb… Read more »

Remove Line Breaks with tr

I had a text file with multiple lines of input that I was manipulating using awk and sed but I found the following ‘tr’ command easiest to remove the line breaks: cat input.txt | tr -d ‘\n’

BIND on CentOS 5

The version of Bind in the normal Red Hat / CentOS repositories is a little out of date. To get more up-to-date versions (9.7.4 at the time of writing) use the Centalt and EPEL repositories. Create the following file: vi /etc/yum.repos.d/centalt.repo And add the following to it: [CentALT] name=CentALT Packages for Enterprise Linux 5 –… Read more »