Top 10 sysadmin apps

Right so you been running a web server for a long time now… How do you know that every thing is running right? and how do you monitor every thing?  Well here is a list of 10 Sysadmin apps every system admin should know of:

 

  1. htop – This is htop, an interactive process viewer for Linux.
  2. iotop – Iotop is a Python program with a top like UI used to show of behalf of which process is the I/O going on.
  3. mytop – mytop is a console-based (non-gui) tool for monitoring the threads and overall performance of a MySQL Server.
  4. iftop –  It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts.
  5. iptraf – IPTraf is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts.
  6. apachetop – This is a console-based (non-gui) monitoring tool which reads the server-status pages from one or more Apache servers and combines the information onto one easy monitoring screen.
  7. munin – Munin is a networked resource monitoring tool that can help analyze resource trends.
  8. screen – Screen is a full-screen window manager that multiplexes a physical terminal between several processes.
  9. ossec – OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.
  10. kippo – Kippo is a medium interaction SSH honeypot designed to log brute force attacks and, most importantly, the entire shell interaction performed by the attacker.

 

You can install any of them just by running:

apt-get install <name>

 

Know of a system administration application that helps you out? Share it in the comments below.

How to remove X-PHP-Originating-Script

X-PHP-Originating-Script Will show the line and script of the file witch sent the email within php.  You may want to disable this for security reasons.

To do so… Just edit /etc/php5/cgi/php.ini and change the following to:

mail.add_x_header = Off

 

While your in there change:

expose_php = Off

How to setup Domain Keys (DKIM) using Debian and Postfix

DomainKeys is an e-mail authentication system designed to verify the DNS domain of an e-mail sender thereby allowing a person, or organization to claim some responsibility for the message and helps verify that your mail is legitimate. This will help your emails not get flagged as spam or fraud, especially if you are doing bulk emailing or important emails.

So first will will need to make sure our system is up to date:

apt-get update 
apt-get upgrade
 

Next we will need to Install postfix and dkim-filter

apt-get install postfix dkim-filter
 

When the configuration prompt ask, choose “Internet Site”.  Now both postfix and dkim-filter are installed you will need to setup dkim-filter.

I’m going to use the domain of: meeping.org for this howto.

Run the following commands:

mkdir -p /etc/dkim/keys/meeping.org/
cd /etc/dkim/keys/meeping.org/
dkim-genkey -r -d meeping.org
 

Next make a file called: /etc/dkim-keys.conf and insert the following:

*@meeping.org:meeping.org:/etc/dkim/keys/meeping.org/default.private

 

Now you will need to configure postfix and dkim-filter to work together.

Edit /etc/dkim-filter.conf and add the following 2 lines at the bottom:

KeyList /etc/dkim-keys.conf
Socket inet:8891@localhost
 

Now restart the DKIM filter:

/etc/init.d/dkim-filter restart

 

Now edit your postfix config( /etc/postfix/main.cf ) and add the following lines:

milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891

 

and restart postfix ( postfix reload )

Next we will have to insert out Key into our DNS Server.

cat /etc/dkim/keys/meeping.org/default.txt

Witch will look like something like this: (The Stuff in Bold is what we want.)

default._domainkey IN TXT “v=DKIM1; g=*; k=rsa; p=MIGfMA0GCBiQKBgQC2/6Q+2eL4RL3lRi/WA0riuCk3WV+u” ; —– DKIM default for meeping.org

 

Now just add a TXT Record for the domain with:

Name: default.private._domainkey
Value:  v=DKIM1; g=*; k=rsa; p=MIGfMA0GCBiQKBgQC2/ynaGiLr0/6Q+2eL4RL3lRi/WA0riuCk3WV+u
 

Apply the Setting… and wait a bit for dns to work.

 

Next testing!

 

This website seems to work nicely for testing DKIM:

http://www.brandonchecketts.com/emailtest.php

 

 

2012 X-Mas Wish List

This will be an active page that I will be added Content to up intill Christmas. So here we go:

Well that’s about it… My wish list…
 
Posted in About Me by RCP. No Comments

I would pay to see this…

Posted in Funny Video's by RCP. No Comments

Coming soon! – WetPHP

WetPHP is a utility class for PHP that sends back a JSON object of instructions to make changes to the DOM. Every return contains the new update interval (adjusted regularly to account for load average), the ID value of the target, the data, and the attribute (be it innerHTML or an actual attribute like SRC or HREF, and  more!).

 

 

 

 

 

This will be released later this month!