martes, 30 de mayo de 2017

Icono en Escritorio para ejecutar Script en Linux

Esta vez se trata de:

  • Tenemos un Script y deseamos ejecutarlo con un Doble Clic en un icono del escritorio

  1. Crear el Scritp que deseo ejecutar
  2. Crear en el escritorio un archivo llamado tunombre.desktop
  3. Hacer ejecutable el archivo tunombre.desktop   
  4. Cambiarse de directorio al Escritorio: cd /home/nombre de usuario
    chmod a+x tunombre.desktop 


 Contenido del archivo tunombre.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=NsLookup
Type=Application
Terminal=true
Exec=/home/nombredeusuarioe/nombre del script
Icon=/ruta donde se encuentra el icono que deseo se vea en el escritorio

miércoles, 19 de abril de 2017

ENGENIUS ACCESS POINT Eoc-2611P

EL problema:

  • No hay acceso con ningún password a la gestión web ni telnet (192.168.1.1) del ACCESS POINT ENGENIUS EOC-2611P. Sin embargo, sí responde contínuo a ICMP (ping).
Lo requerido:
  • Archivos cfg.jffs2, jffs2.eoc-2610.bin, vmlinuxap51.bin.l7 
  • Instalar y habilitar el servicio TFTP en el pc (Pumkin me funcionó muy bien) como el ofrecido por solarwinds o cualquier otro fabricante (gratuito)
  • Un cliente TELNET (Ejemplo Putty)
  • De ser posible, un UPS que alimente el PC y el EOC-2611P
El procedimiento:
  • Apagar el Access Point EOC 2611P
  • Ejecutar Ping contínuo a 192.168.1.1 (ping -t 192.168.1.1 si la pc es windows, si no es windows no es necesario el parámetro -t) y dejar esa ventana de comandos abierta.
  • Encender el EOC-2611P
  • Inmediatamente que se observe que hay respuesta Ping proceder al siguiente paso
  • Ejecutar un telnet al puerto 9000 con destino a 192.168.1.1
  • Se abrirá la consola con Redboot>
  • De allí en adelante deben ejecutarse una serie de instrucciones (respetando los espacios en la sintaxis)



RedBoot> ip_address -l 192.168.1.1/24 -h 192.168.1.10 (esta es la dir IP de la PC que tiene habilitado el servicio TFTP, conectada al Access Point)
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.20
RedBoot> load -r -b %{FREEMEMLO} jffs2.eoc-2610.bin
Using default protocol (TFTP)
Raw file loaded 0x80041000-0x80430fff, assumed entry at 0x80041000
RedBoot> fis init -f
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xa8030000-0xa87e0000: ...........................................................................................................................
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> fis create256 -f 0xa8030000 -l 0x3f0000 -e 0 rootfs
... Erase from 0xa8030000-0xa8420000: ...............................................................
... Program from 0x80041000-0x80431000 at 0xa8030000: ...............................................................
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -b %{FREEMEMLO} vmlinux.ap51.bin.l7
Using default protocol (TFTP)
Raw file loaded 0x80041000-0x800e0fff, assumed entry at 0x80041000
RedBoot> fis create256 -l 0xa0000 -f 0xa8420000 -e 0x80041798 -r 0x80041000 vmlinux.bin.l7
... Erase from 0xa8420000-0xa84c0000: ..........
... Program from 0x80041000-0x800e1000 at 0xa8420000: ..........
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -b %{FREEMEMLO} cfg.jffs2
Using default protocol (TFTP)
Raw file loaded 0x80041000-0x80041000, assumed entry at 0x80041000
RedBoot> fis create256 -l 0x10000 -f 0xa84c0000 -e 0 cfg
... Erase from 0xa84c0000-0xa84d0000: .
... Program from 0x80041000-0x80041001 at 0xa84c0000: .
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> reset


Una vez reseteado el equipo, deberíamos tener capacidad de entrar con el usuario y password admin.




domingo, 12 de marzo de 2017

Test a sitio web desde Linux y otras Herramientas

En diversas ocasiones es necesario verificar ciertos parámetros en el acceso a sitios web.

En tal sentido, se muestran algunas opciones para verificar tiempos de respuesta desde el cli(command line interface) de Linux.

WGET
usuario@hostname-de-tu-pc:~$ wget -p http://www.sitio_a_verificar.com


CURL
usuario@hostname-de-tu-pc:~$time curl -I http://www.google.com | grep HTTP

usuario@hostname-de-tu-pc:~$curl -Is http://www.google.com | head -1

usuario@hostname-de-tu-pc:~$curl -s -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null http://www.google.com




Herramienta de Google:

https://toolbox.googleapps.com/apps/dig/


App para Chrome:
Chrome Connectivity Diagnostics
https://chrome.google.com/webstore/detail/chrome-connectivity-diagn/eemlkeanncmjljgehlbplemhmdmalhdc?utm_source=chrome-app-launcher-info-dialog

Documentación Adicional


CURL:
https://curl.haxx.se/

Wget
https://www.gnu.org/software/wget/manual/


Httpie
https://httpie.org/


Twill
http://twill.idyll.org/


Se anexan en este link los códigos de respuesta:

https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Sitio para verificar página web:

https://www.webpagetest.org/easy.php

viernes, 28 de febrero de 2014

Ethical hacking

http://www.guru99.com/ethical-hacking-tutorials.html

lunes, 23 de diciembre de 2013

TCP/ IP con Netsh.exe

Este es un extracto del sitio Pietri.co.ilhttp://www.petri.co.il/configure_tcp_ip_from_cmd.htm

In order to configure TCP/IP settings such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses and many other options you can use Netsh.exe.
Netsh.exe is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh.exe also provides a scripting feature that allows you to run a group of commands in batch mode against a specified computer. Netsh.exe can also save a configuration script in a text file for archival purposes or to help you configure other servers.
Netsh.exe is available on Windows 2000, Windows XP, and Windows Server 2003.
You can use the Netsh.exe tool to perform the following tasks:
  • Configure interfaces
  • Configure routing protocols
  • Configure filters
  • Configure routes
  • Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
  • Display the configuration of a currently running router on any computer
  • Use the scripting feature to run a collection of commands in batch mode against a specified router.

What can we do with Netsh.exe?

With Netsh.exe you can easily view your TCP/IP settings. Type the following command in a Command Prompt window (CMD.EXE):
netsh interface ip show config
With Netsh.exe, you can easily configure your computer's IP address and other TCP/IP related settings. For example:
The following command configures the interface named Local Area Connection with the static IP address 192.168.0.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1:
netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1
(The above line is one long line, copy paste it as one line)
Netsh.exe can be also useful in certain scenarios such as when you have a portable computer that needs to be relocated between 2 or more office locations, while still maintaining a specific and static IP address configuration. With Netsh.exe, you can easily save and restore the appropriate network configuration.
First, connect your portable computer to location #1, and then manually configure the required settings (such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses).
Now, you need to export your current IP settings to a text file. Use the following command:
netsh -c interface dump > c:\location1.txt
When you reach location #2, do the same thing, only keep the new settings to a different file:
netsh -c interface dump > c:\location2.txt
You can go on with any other location you may need, but we'll keep it simple and only use 2 examples.
Now, whenever you need to quickly import your IP settings and change them between location #1 and location #2, just enter the following command in a Command Prompt window (CMD.EXE):
netsh -f c:\location1.txt
or
netsh -f c:\location2.txt
and so on.
You can also use the global EXEC switch instead of -F:
netsh exec c:\location2.txt
Netsh.exe can also be used to configure your NIC to automatically obtain an IP address from a DHCP server:
netsh interface ip set address "Local Area Connection" dhcp
Would you like to configure DNS and WINS addresses from the Command Prompt? You can. See this example for DNS:
netsh interface ip set dns "Local Area Connection" static 192.168.0.200
and this one for WINS:
netsh interface ip set wins "Local Area Connection" static 192.168.0.200
Or, if you want, you can configure your NIC to dynamically obtain it's DNS settings:
netsh interface ip set dns "Local Area Connection" dhcp
BTW, if you want to set a primary and secondary DNS address, add index=1 and index=2 respectively to the lines of Netsh command.
As you now see, Netsh.exe has many features you might find useful, and that goes beyond saying even without looking into the other valuable options that exist in the command.

Instalar Cantv Satelital

Instalación de CANTV Satelital

Kit Satellital CANTV

Para evitar frustraciones:

  • Sigue muy bien las instrucciones de armado del plato y su base, cada tornillo tiene su función y ubicación. 
  •  Verifica que para la abrazadera (la que ajusta la inclinación) se utilizan DOS (2) tornillos cortos instalados de dentro hacia afuera. Busca la brújula y verifica que hacia el Sur-Oeste (si estás en San Felipe) no hay obstrucciones (arboles, edificios, etc) que impidan la comunicación entre el satélite y tu antena. Para saber cómo ubicar el Sur-Oeste, coloca la brújula en una superficie horizontal, gira la misma hasta hacer coincidir la flecha roja con la letra "N", es decir, el Norte y ya puedes orientar el rumbo que tendrá tu antena. 
  •  Ya puedes saber hacia dónde irá apuntada la antena (SUR-OESTE). El detalle de cuántos grados hacia el SUR_OESTE va a depender de la ciudad en Venezuela. Por ejemplo, En San Felipe, los grados son 223° SO (SUR-OESTE). 
  •  Para saber la inclinación (arriba-abajo) le darás a la antena, debes buscar en el instructivo los grados de inclinación que corresponden a tu ciudad (Por Ejemplo para San Felipe, la antena debe estar inclinada 73°). Una vez que sepas cuál inclinación le darás a la antena, procede a ajustar los tornillos de manera que la antena quede inclinada 73° si estás en San Felipe. No los apretes en exceso pues luego deberás subir o bajar un poco esos grados para que mejore la recepción.
  • Ubica una superficie tal que no tenga obstrucciones hacia la orientación que le darás a la antena. (Por ejemplo en San Felipe, hay que buscar un sitio que no tenga obstrucciones hacia el Sur Oeste).
  • Una vez que estás seguro del sitio, fija LA BASE del mástil tomando en cuenta el NIVEL, es decir, DEBE estar nivelado horizontal o verticalmente dependiendo de si la estás instalando en una pared o sobre la azotea. Ajusta el mástil en la base que acabas de instalar de forma que quede NIVELADO y a 90° con respecto a la pared o el techo. Recuerda insertar el LNB en su base. Ahora inserta la antena (a través de la abrazadera) en el mástil.
  • Mueve la antena Horizontalmente hasta apuntarla 223° hacia el SUR OESTE (si estás en San Felipe) Ya tienes la antena apuntando hacia la orientación que indica el manual (según la ciudad).
  •  Ya tienes la antena inclinada los grados que indica el manual (según la ciudad).
  •  Ya tienes instalado el LNB en su base. 
  • Conecta el cable de video-audio en el tv y en el deco, según el manual que trae la antena cantv. Ahora hay que conectar, con el deco apagado, el cable coaxial al LNB. (RECUERDA: ESTO ES CON EL DECO APAGADO) Conecta ahora el otro extremo del cable coaxial largo al conector en el deco que dice "Lnb" Debes girar un poco a la izquierda (mirando la antena de frente) el LNB. El manual indica entre las 4 y las 5 según la ciudad.
  • Conecta el cable coaxial corto de la siguientre forma: Una punta en el conector en el deco que dice "Ch3/CH4" La otra punta al conector coaxial que trae el TV. Ahora enciende el deco y el TV. El TV debe estar en entrada de Video, no en un canal sino en "Video". 
  • Bien, ahora verás en la pantalla un menú de opciones. Selecciona la opción "Instalar". Aparecerá un medidor de señal en intensidad y calidad. Escucharás también un tono que indica la intensidad y calidad.
  • Si suena lento es porque falta ajustar para tener una buena intensidad y calidad. Si aumenta la velocidad es porque está mejorando la intensidad-calidad. RECUERDA QUE EL MÄSTIL Y SU BASE DEBEN ESTAR NIVELADOS HORIZONTAL Y VERTICAL. Si la inclinación dice 73°, fíjala en 75° para luego ir bajando si es necesario.
  •  Si aparece cero en intensidad y calidad no te preocupes, eso se debe a que hay que orientar bien la antena hacia el rumbo adecuado (SUR OESTE si estás en San Felipe) y con la inclinación adecuada (73° si estás en San Felipe). 
  •  Mueve la antena a la izquierda hasta unos grados menos de lo que te dice el manual (Por ejemplo si el manual te dice que son 223° SUR OESTE, gira la antena horizontalmente hasta 190°). 
  •  Ya el tono debe estar sonando más rápido indicando que aumentó el nivel de señal. Igualmente verás un aumento del nivel de intensidad y calidad en el indicador de la pantalla. 
  •  La Intensidad debe estar por encima de 75 y la calidad por encima de 65. Si la intensidad es baja, debes mover muy poco hacia la derecha la antena e ir escuchando y observando en la pantalla. Te aconsejo que primero dejes fija la inclinación y el giro del lnb y muevas sólo horizontalmente la antena. Luego deberás ajustar el giro del lnb según el manual.
  •  De ser necesario, deberás ajustar la inclinación, te aconsejo que la fijes en un principio 2 o 3 grados por encima de lo que dice el manual y vas bajando si es necesario, es decir, si el manual dice 73° de inclinación, fíjalo en 76°. 
  •  Cuando tengas la intensidad y calidad recomendadas, presiona OK (o aceptar) del control remoto del deco y verás cómo se registran rápidamente una serie de nombres de canales. Anota el número de serial que trae la tarjeta de chip. Cuando el deco te lo indique, inserta la tarjeta de chip. 
  •  A continuación debes llamar al 0800-CANTV-TV para activar el servicio y debes tener a la mano una tarjeta UNICA de 100BsF o las que hagan la sumatoria, por ejemplo una de 60 y dos de 20 porque el sistema te las pedirá posteriormente. Cuando llamas, el sistema primero te pedirá el serial (ese es el de la tarjeta de chip) y luego te pedirá el código que raspaste de la tarjeta unica. Recuerda que mensualmente debes llamar al 0800-CANTV-TV para cargar saldo correspondiente para continuar disfrutando del servicio.
  •  En otra oportunidad subiré imágenes ilustrativas para mejorar el tutorial de instalación de cantv satelital.

lunes, 6 de diciembre de 2010

BMC en servidores IBM x366

¿Es posible administrar un servidor IBM remotamente sin la "famosa" tarjeta RSA?
SI
¿Cómo ...?
Con BMC.

Para acceder al servidor hay que hacer varias cosas:
Configurar una dirección IP al BMC junto con Login y password.
Habilitar las funciones indicadas en

http://www.redbooks.ibm.com/abstracts/tips0551.html
Para la configuración de IP, Login y pass del BMC, se accede al setup del servidor (F1 en el caso de un IBM x366).
Instalar en un PC o equipo desde donde deseo acceder y administrar al servidor una aplicación : OSA System Management Bridge
System Management Bridge Baseboard Management Controller CLI and Remote Console Utility
http://www-947.ibm.com/support/entry/portal/docdisplay?brand=5000008&lndocid=MIGR-64636
Ejecutar el software en la ruta donde se instaló ejecutando una línea parecida a esta:
C:\Archivos de programa\Avocent\SMBridge>smbridge -ip a.b.c.d -u nombre de usuario previamente configurado en el BMC -p clave configurada para el BMC power status
El comando anterior devuelve el estado del servidor (si está on u off)

Si queremos encender el servidor, el comando es power on, es decir,
C:\Archivos de programa\Avocent\SMBridge>smbridge -ip a.b.c.d -u nombre de usuario -p clave power on

Si queremos apagar el servidor, el comando es power off, es decir,
C:\Archivos de programa\Avocent\SMBridge>smbridge -ip a.b.c.d -u nombre de usuario -p clave power off

Un listado de los comandos aparece en el manual del OSA SMBridge User Manual (OSA es el fabricante, después de 3 horas de investigación, me di cuenta que simplemente era el fabricante del software)
ftp://ftp.software.ibm.com/systems/support/system_x_pdf/sysmgmtbridgeuserman.pdf

El siguiente paso lo postearé luego,
voy a seguir configurando porque la intención es encender varios servidores remotamente pero con espacios de tiempo entre cada uno.

Con IBM Director se puede administrar más intuitivamente las BMC de varios servidores, eso está en mi lista de tareas también.

Hay que repasar estos conceptos
Intelligent Platform Management Interface (IPMI)

Este es un extracto de la configuración de BMC en el servidor que deseo administrar remotamente.
Configuring BIOS to enable Serial Over LAN

Before SMBridge can be used to manage a remote server via SOL, the BMC and BIOS of the remote server must have the following settings configured.

Note: This procedure disables PXE boot on Gigabit port 1 on the server. If you plan to use PXE, you will need to connect Gigabit port 2 to your network and ensure that your remote install procedure is configured to use that port.

1. Enter BIOS Setup by pressing F1 when prompted during boot.
2. If you have not done so already, configure the static IP address, subnet mask, and gateway of the BMC in Advanced Options > Baseboard Management Controller (BMC) Settings.
3. From the main menu, select Devices and I/O Ports. Set the following:
* Set field Serial Port A to Auto-configure
* Set field Serial Port B to Auto-configure
4. Select Remote Console Redirection. Set the following:
* Remote Console Active to Active
* Remote Console Text Emulation to VT100/VT220
* Remote Console Keyboard Emulation to VT100/VT220
* Remote Console Active After Boot to Enabled
* Remote Console Flow Control to Hardware
5. The setup window should now look similar to the following:

********************************************************
* Remote Console Redirection *
********************************************************
* Remote Console Active [ Enabled ] *
* Remote Console COM Port [ COM 1 ] *
* Remote Console Baud Rate [ 19200 ] *
* Remote Console Data Bits [ 8 ] *
* Remote Console Parity [ None ] *
* Remote Console Stop Bits [ 1 ] *
* Remote Console Text Emulation [ VT100/VT220 ] *
* Remote Console Keyboard Emulation [ VT100/VT220 ] *
* Remote Console Active After Boot [ Enabled ] *
* Remote Console Flow Control [ Hardware ] *
********************************************************
6. Press Esc twice to return to the main menu, then select Start Options. Set the following:
Note: You will most likely only have some of these options on your server. For example on the x236, we only set Planar Ethernet PXE/DHCP to Planar Ethernet 2.
* Planar Ethernet 1 PXE to Disabled
* Planar Ethernet 2 PXE to Enabled
* Planar Ethernet PXE/DHCP to Planar Ethernet 2
* Run PXE only on Selected Planar NIC to Enabled
7. Press Esc to return to the main menu, then select Advanced Options then Baseboard Management Controller (BMC) Settings. Set the following:
* System-BMC Serial Port Sharing to Enabled
* BMC Serial Port Access Mode to Dedicated
8. Save the BIOS settings and reboot the server.