logIt Log Around The Clock

General Linux

Running Raddle in RHEL

Raddle is a great SNMP player written in Perl. I say player to this emulator application, meaning that I can append or dump snmpwalk output from a device and then replay that from Raddle. Installing it can be both simple and tedious tasks. I used Red Hat Enterprise Linux 5.2 inside a virtual machine (VirtualBox) [...]

Install Nagios 3 and Plugins

Quickstart I decided to install in RedHat 5.2. Maybe it is easier in Ubuntu (Nagios 3 already listed in the repository, but I haven’t tried it). As pointed out by the quickstart (it is meant for Fedora by the way), requirements are: php, httpd gcc, glibc, glibc-common gd, gd-devel After getting those, the configure-make-install procedure [...]

OpenSSH With Key

tags:

ssh-keygen -t dsa Will generate a pair of public-private key (with type DSA) inside ~/.ssh/. Defaults are: id_dsa and id_dsa.pub The public key can be tranfered to other host with running sshd (ssh server). Default authorization key file used by sshd is ~/.ssh/authorized_keys (this can be configured from /etc/ssh/sshd_config). Append the generated id_dsa.pub to this [...]

Configuring Cacti

A successful installation in a LAMP system may require more library. I added php5-cli to enable php through command line i.e $ /usr/bin/php , libphp-adodb, php5-snmp. In localhost snmpd is installed and configured /etc/default/snmpd: SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid’ and edit /etc/snmp/snmpd.conf to have: com2sec readonly  localhost         <some community string> Install [...]

Basic squid In A Gateway

This trial is done in a RedHat (RHEL 5.2) inside VirtualBox. The required squid package is using squid-3.0.STABLE13-1.el5.i386.rpm. Two interfaces is configured in this box as shown in the following NAT masquerading which build a simple router at 192.168.40.40 (eth1) : 1 2 3 4 5 6 7 8 WAN=wan0 LAN=eth1 IPTABLES=/sbin/iptables   $IPTABLES –flush                         [...]

Mount with fstab and UUID

Check UUID: $ blkid   /dev/loop0: TYPE="squashfs" /dev/sda1: UUID="46E439E9E439DBBD" LABEL="SYSTEM" TYPE="ntfs" /dev/sda5: LABEL="DATA" UUID="0686-FAFA" TYPE="vfat" /dev/sda6: UUID="4ddd1e8c-e2e2-4397-838b-ea953e0a7795" SEC_TYPE="ext2" TYPE="ext3" /dev/sda7: TYPE="swap" UUID="9be4f92e-4f22-41f4-9aee-1c93f9cdf6ac" /dev/sda8: UUID="6a969f33-240b-440c-9a43-e68f8b28fd19" SEC_TYPE="ext2" TYPE="ext3" /dev/sda9: UUID="d7aac664-c177-46aa-be67-40aad4d3f129" TYPE="ext3" SEC_TYPE="ext2" /dev/sda10: UUID="36cdb4cb-351b-4f47-9c24-64a9e80c826b" TYPE="ext4" or $ sudo vol_id -u /dev/sda7 9be4f92e-4f22-41f4-9aee-1c93f9cdf6ac Put it in /etc/fstab to mount the device at boot. # /etc/fstab: static file system [...]

Queue Job To Be Executed At Certain Times

A series of command can be queued by using at command. There are slight variations between UNIXs for at command, the following example is for Ubuntu. Due to to the purpose of running it for OpenView managed nodes (this is some sort of trial-test), I put the job queue as if it was done through [...]

Function Return Value ?

tags:

The following function: 1 2 3 processLine(){ <strong>line</strong>="$@" } Does it have some sort of “return value”? (in this case the variable line) by calling it through: processLine $line echo $line In the above example, I echo the value of line after being processed by processLine(). (?)

Startup script for TAP interfaces

To add startup script we can use: System > Preferences > Sessions local boot script (as services start/stop in /etc/init.d/) I added the following shell script: setup-tap: #! /bin/bash tap_up() { tunctl -t tap0 -u $USER tunctl -t tap1 -u $USER ifconfig tap0 192.168.20.1 ifconfig tap1 192.168.40.1 #iptables -t nat -A POSTROUTING -o eth1 -j [...]

After →