Thursday, August 22, 2013

List open ports and listening services

One of the first things you should do after a fresh operating system install is see what services are running and remove any unneeded services from the system startup process. You could use a port scanner and run it against the host, but if one didn’t come with the operating system install, you’ll 
likely have to connect your fresh (and possibly insecure) machine to the network to download one.



Wednesday, August 14, 2013

Monitor Network Bandwidth Usage With Vnstat

Vnstat is the tool to check the the internet bandwidth usage, finding the bandwidth usage over an hour, day, week can be tricky. to install vnstat in linux you need to run the following command.


sudo apt-get install vnstat

Wednesday, August 7, 2013

Use Gmail in terminal with vmail

Vmail provides a interface to send email from terminal.
To install vmail you need Ruby 1.9.0` or higher with SSL support in your linux.
Here is the step to install vmail in the terminal.


Step 1: installing the vmail using gem.
sudo gem install vmail

Step 2: Creating yaml file to set up gmail account.
To run Vmail, create a yaml file called .vmailrc and save it either in ~/.vmail/default/ or in your home directory. If you do the latter, Vmail will move the file to ~/.vmail/default/ when it starts up.

Step 3: Content in the  .vmailrc yaml file.
username: surficle@gmail.com 
password: password 
name: atul arvind signature: |
  -- 
  Sent from Vmail. http://surficle.com
This file should be formatted in YAML syntax. If you have any unsual characters in a string value, try putting quotes around that value.

Starting vmail in Terminal:

Once you've created the configuration file and (optionally) the contacts file, you can start Vmail with
vmail

This opens the Vmail/Vim interface and shows you the last 100 messages in your Gmail inbox.
You can have Vmail show messages from any other mailbox (a.k.a. label) on startup by passing in the mailbox name as an argument: