viernes, 10 de agosto de 2012

iptraf & tcpdump

The iptraf command is interactive colorful IP LAN monitor. It is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. It can provide the following info in easy to read format:
  1. Network traffic statistics by TCP connection
  2. IP traffic statistics by network interface
  3. Network traffic statistics by protocol
  4. Network traffic statistics by TCP/UDP port and by packet size
  5. Network traffic statistics by Layer2 address
Exercise : Ip Traffic Monitor ---> eth1 [ethernet] network interface  
----------------------------------------------------------------------------------------------------------------------------------

The tcpdump is simple command that dump traffic on a network. However, you need good understanding of TCP/IP protocol to utilize this tool. For.e.g to display traffic info about DNS, enter:

# tcpdump -i eth1 'udp port 53'

Packages were kept back

Sometimes you'll run 'apt-get upgrade' in Debian or Ubuntu and you'll get a message stating that "the following packages have been kept back" which is annoying but here is a way to get around it.


The reason the packages were kept back is because they violate the below constraint. "dist-upgrade" is the correct method.

From the apt-get man page regarding: "`upgrade` under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version."

"dist-upgrade intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. So, dist-upgrade command may remove some packages."


Solution 1 : as root  apt-get dist-upgrade


Solution 2 : apt-get install [packages that are keep back]

miércoles, 8 de agosto de 2012

IPTABLES

nmap being used by Trinity in The Matrix to detect ssh running on a vulnerable node before launching an attack on the sshv1 CRC32 flaw and gaining root to shut down the power grid.



Rule1 : Target REJECT do with a TCP-RESET

-A INPUT -i eth0 -p tcp -m tcp --dport 443 -j REJECT --reject-with tcp-reset

result : 443/tcp closed https

martes, 7 de agosto de 2012

nmon performance: A free tool to analyze AIX and Linux performance

debian apt-get install nmon 
http://www.cyberciti.biz/faq/nmon-performance-analyzer-linux-server-tool/

Java Nmon Analyser

http://sourceforge.net/projects/jnmonanalyser/files/



 

jueves, 26 de julio de 2012

Fetch External Repositories on Ubuntu How to

DesdeUbuntu Karmic Koala disponemos de una nueva herramienta para añadir repositorios PPA de Launchpad de una forma mucho más sencilla, copiando una línea mucho más simple que además descarga y añade automáticamente su clave GPG. Puede hacerse desde el terminal, ejecutando el siguiente comando: 

sudo add-apt-repository ppa:nombre_del_ppa

Además, este nuevo sistema no añade la línea completa al fichero /etc/apt/sources.list sino que lo crea con su propio fichero en el directorio sources.list.d, lo cual suele ser mucho mejor para el mantenimiento del sistema, tener todos los repositorios en ficheros diferentes.

The program 'add-apt-repository' is currently not installed.  You can install it by typing:

apt-get install python-software-properties

----- /usr/bin/add-apt-repository

----- /usr/bin/apt-add-repository


Free open source project hosting. Repository based on the Bazaar VCS.

 https://launchpad.net/


https://help.launchpad.net/Packaging/PPA


How do I update Ubuntu Linux softwares.

Using apt-get command line tool

apt-get is the command-line tool for handling packages. You can use following command options:

=> apt-get update : Update is used to resynchronize the package index files from their sources via Internet.

=> apt-get upgrade : Upgrade is used to install the newest versions of all packages currently installed on the system.

=> apt-get install package-name : install is followed by one or more packages desired for installation. If package is already installed it will try to update to latest version.

=> To upgrade individual software called foo type command: apt-get install foo


More info @ https://help.ubuntu.com/11.04/serverguide/package-management.html 


More info @ http://www.guia-ubuntu.org/index.php?title=A%C3%B1adir_repositorios_externos