Thursday 25 July 2013

How to find currently active systems in your network using nmap.

This post will help you to get the IP address of all the host (systems/computers)
which are currently active in you network. For example if you are using a network 192.168.1.0/24 network ie may be in your institution you are having an ip address of 192.168.1.25. Then you will be able to know all the IP address currently active in the range 192.168.1.xxx. This can be done using nmap which is used as a hack tool to analyze remote systems.

Steps:
+++++

1) If you are not having nmap already installed on your system you may have to install
   it first.
  
   a) if you are using ubuntu or debian systems

   -------------------------
   sudo apt-get install nmap
   -------------------------
 
   b) if you are using fedora or centos
  
   ----------------
   yum install nmap
   ---------------
2) Once this is done you can always execute the following command and
   find out currently turned on systems in your network.

  
   -----------------------------------------------------------------
   nmap -sP 192.168.1.0/24
   -----------------------------------------------------------------

   Example:
   ________________________________________________________________
   rzm@rasim:~$ nmap -sP 192.168.1.0/24

   Starting Nmap 5.21 ( http://nmap.org ) at 2013-07-26 06:56 IST
   Nmap scan report for 192.168.1.1
   Host is up (0.0056s latency).
   Nmap scan report for 192.168.1.2
   Host is up (0.021s latency).
   Nmap scan report for 192.168.1.3
   Host is up (0.00050s latency).
   Nmap done: 256 IP addresses (3 hosts up) scanned in 3.50 seconds
   ________________________________________________________________
  
   The above example shows 3 host which are active in my network.






Hope you have enjoyed the post

rzm

How to do Micro updates on Plesk Control panels (8.x,9.x,10.x,11.x)

Micro updates of Plesk help us prevent most of the new vulnerabilities in Plesk. I will explain how it can be done via command line. It is actually really simple to do it if you are having root access to the system.


Steps


1) login to your server via ssh( root@<ip> -p <port>).
2) Just execute the command

--------------------------------------------------------------------------------------------------------
/usr/local/psa/admin/sbin/autoinstaller --select-product-id plesk --select-release-current --reinstall-patch --install-component base
--------------------------------------------------------------------------------------------------------

This can also be found in plesk KB (http://kb.parallels.com/en/9294). The only confusing part for a new bie is the term ($PRODUCT_ROOT_D)
which have to be replaced with the plesk directory which is /usr/local/psa in most cases.


Hope you have enjoyed the post.
rzm

Monday 22 July 2013

Send email from command line using Ubuntu 12.04

To send email from command line in Ubuntu the best command line which can be used is
mutt. But this does not come pre-installed in the system so you may have to add it.

Please do the following in the command prompt (shell) of  your system.

1) sudo apt-get install mutt
2) Once the installation is complete you will have to add the normal user with
   mail priviledges using the following command line.
   sudo adduser <your username> mail
3) Once this is done you will be able to send mail via command line.
   using either of th following commands.
   a) echo test | mutt -s <subject of mail> email-id
   b) cat <file-name>  | mutt -s <subject of mail> email-id
in case a the mail content will be test an in case b) it will the content written in
file <file-name>

Hope you have enjoyed the post
rzm