New download mirror for UBCD

From today we are mirroring UBCD iso download.

For those who are not familiar UBCD stands for Ultimate Boot CD and it is collection of Open Source and freeware tools that could be used to troubleshoot or fix issues with your PC.

I will not list all the tools(you can check that yourself on UBCD site) but the number is impressive.

Tagged with: ,

vzdump rpm

In some of my projects I use OpenVZ to create containers.

One of the tools I use to create backup of running container is vzdump from
Unfortunately rpm provided is older version and latest provided only as debian package.

As source is available I was able to create RPM package and created misc repo.
Here is how to use it

name=Misc Packages for Enterprise Linux 6 - $basearch

Current version is:

Tagged with: , ,

Oracle VirtualBox shared clipboard

Oracle VM VirtualBox is a virtualization software package. It is really useful to run several OS simultaneously. And great educational tool.

One useful feature not enabled by default is possibility to copy/paste between host and guest (also called shared clipboard).

To benefit from that feature first you need to have guest additions installed.

Once you install them go to Virtual Machine settings:

  1. Click on Machine(1) then Settings(2). Result will be similar to below, but focused on Basic.
  2. Choose Advanced Tab(1). There you will see Shared Clipboard setting(2). By default it is set to Disabled.
    vbox-shared clipboard

You have option to allow Bidirectional; From Host to Guest or Guest to Host.

My preferred is Bidirectional. In this way data could be transferred in both directions.

That is all…


Tagged with: ,

C (programming language) cheatsheet added

Recently I’ve decided that even some people think that C programming language is old and obsolete it still worth be be learned.
While learning I’ve frequently consulted information about different commands.

As consequence I’ve created small C cheat sheet that I share with you.
Let me know if something important is missing let me know via comments or contact form.

Tagged with: , ,

Password strength – Comic


Source: xkcd

Tagged with: ,

Using screen as default shell

GNU Screen is excellent sysadmin tool and can make your life much easier.
If working on remote ssh shell and connection is interrupted (usually at worst time) I often wish that I’ve started screen in advance.
Other useful way of using it is to execute long remote jobs – no more redirections needed.

One of most “obvious” solution is to change default shell for the user in /etc/passwd.
Unfortunately it causes some incontinences – SCP does not work correctly, aliases do not work correctly etc. not to mention that it does not apply when becoming another user by using “su -”
Here is how I solve above problems…
Instead of modifying /etc/passwd I do add following lines in ~/.bash_profile.

if [[ ( -z "$STY" ) && ( ! -z "$SSH_CONNECTION") ]]
screen -S shell -x 2> /dev/null || screen -S shell

Advantage of doing the change is that it is executed when user is entering in the system via ssh and when nondetached session is found.

Tagged with: , , , ,

Shorewall YUM repository

Shorewal or Shoreline Firewall is is high-level tool for configuring Netfilter.

Even RPM packages are available from long time on most YUM repositories only older versions could be found.
That is the reason I’ve decided to create this repository.

What you will find:
– Shorewall RPMs (starting from version 4.5.21) – If there is public interest I can pull older ones.

How to setup?
Create new repo file in /etc/yum.repos.d

Copy and paste the code
cat shorewall.repo
### Name: Shorewall RPM Repository
### URL:
name = RHEL $releasever - Shorewall -
baseurl =
enabled = 1
protect = 0
gpgcheck = 0

Alternatively to directly download the file you can execute:
cd /etc/yum.repos.d/;wget

What distributions can use it?
I did test with CentOS 5 and 6

How to use it?
If you already have installed shorewall RPM
yum update will pick it.

For initial installation you need to put all modules you need.
For example
yum install shorewall shorewall-core

How Often it updates?
Daily (Version does not change so often)

Where I can find more information about Shorewall?
On the official Shorewall site you can find a ton of information.

Tagged with: , , ,

How to list installed packages in Debian or Ubuntu

If you want to see what packages are installed in Debian or Ubuntu system use following commands:

To list all the package installed:

dpkg-query -l

This will return something similar to this:

dpkg-query -l
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name        Version    Architecture      Description
ii  adduser    3.113+nmu3  all   add and remove users and groups
ii  alsa-base  1.0.25+3    all   ALSA driver configuration files
ii  alsa-utils  i386  Utilities for configuring and using ALSA

To show status of all packages in the system

dpkg -l

This will return a long list so it will be good idea to pipe it to less or more:

dpkg -l

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name        Version    Architecture      Description
ii  adduser    3.113+nmu3  all   add and remove users and groups
ii  alsa-base  1.0.25+3    all   ALSA driver configuration files
ii  alsa-utils  i386  Utilities for configuring and using ALSA

To list installed packages you can also use

dpkg --get-selections

It returns

dpkg --get-selections
adduser install
alsa-base install
alsa-utils install

In addition this allows you to save the software installed by using

dpkg --get-selections > /mybackup/installed-packages.log

and restore on on different machine by issuing

dpkg --set-selections < /mybackup/installed-packages.log
apt-get dselect-upgrade

If you want to see locations where package files reside use

 dpkg -L

This returns:

 dpkg -L alsa-base
Tagged with: , , ,

Mirror of CentALT repository (CentOS 5)

(Translated from CentALT web site Site offline)


Quite a few system administrators use RHEL 5 or one of multiple clones CentOS or Scientific Linux.

With this repository you will be able fairly easy to install on RHEL/CentOS 5 latest versions of: nginx, php-fpm, unbound, clamav, postfix, dovecot etc. without compiling from source code e.g. famous configure, make, make install.

Packages included in the repository

Clamav — in EPEL repository clamav is with limited functionality – fixed here;

Clamsmtpd — small and fast milter, allowing you to add antivirus detection with ClamAV to MTA Postfix;

Conntrack-tools — tools to manage conntrack from userspace;

Dnstop — application to analyze  DNS queries;

Dovecot — fresh versions of POP3/IMAP server  (note that after installation you might need to fix config files;

Postfix — popular MTA, compiled with support for MySQL, PostgreSQL; VDA patch is included;

Httpd — latest apache version;

Mc — Midnight Commander (version 4.7.0). ;

Memcached — system for object caching in system memory – latest version ;

Mod_rpaf — apache module  substituting REMOTE_ADDR  on backend server with the one from frontend using X-Forwarded-For. It allows to hide frontend/backend infrastructure from the scripts. Allows script to see real user IPs instead frontend one.

Mod_realip2 — similar to  mod_rpaf apache module substituting  REMOTE_ADDR on backend server with value received from frontend, using  X-Forwarded-For.It allows to hide frontend/backend infrastructure from the scripts. Allows script to see real user IPs instead frontend one

Mysql — MySQL with 20 patches from percona project;

Nagios — latest version of monitoring system Nagios;

Nagios-plugins — latest version of plugins for monitoring system Nagios;

Nginx — in repository there are 2 version of this web server:

Package nginx — latest development version of nginx. Following modules are included:

H264 Streaming Module

Package nginx-stable — latest stable version of nginx. Following modules are included:

Php — latest php version including php-fpm patch. Configuration file and init script for php-fpm are in  php-fpm package;

Spawn-fcgi — for those who want to execute PHP scripts via FastCGI, but do not want to upgrade original PHP version;

Unbound — Safe and fast caching DNS server;

Vsftpd — ftp server including patch allowing to configure server and client encoding;

flow-tools — tools to work with Netflow format;

fprobe, ipt_netflow, softflowd, ipcad — to collect Netflow data;

quagga — ospfd, bgpd etc.

Kernel modules – connlimit, ipmark, ipset, ipp2p.

Repository installation

CentALT requires EPEL repository.

Installation procedure:

for i386 architecture:

1. Install epel repository.

rpm -ihv

2. Install CentALT repository.

rpm -ihv

For x86_64 architecture:

1. Install epel repository.

rpm -ihv

2. Install CentALT repository.

rpm -ihv

How to setup mirrors

After CentALT RPM install by default all packages are downloaded from main repository.

To set it up for mirrors you have to change one file and add another.

1. Open with your favorite text editor /etc/yum.repos.d/centalt.repo and change it to look like this:

name=CentALT Packages for Enterprise Linux 5 - $basearch
mirrorlist = file:///etc/yum.repos.d/mirrors-centalt

2. Create new file /etc/yum.repos.d/mirrors-centalt and put following info inside$basearch/$basearch/

3. Clean YUM cache
yum clean all

4. And this is it you can benefit fro CentALT mirrors

Tagged with: , , ,

IPv4 CIDR cheatsheet added

When you have multiple CIDR subnets in your network subnet mask is often different.

To be certain about correct netmask I’m using CIDR cheat sheet.

You can find it at IPv4 CIDR page.

Note: CIDR is classless inter domain routing.

Tagged with: , ,