Entradas populares

¿Como Crear tunel GRE con Router CISCO? // ¿How to create a GRE tunnel with CISCO Routers?

Seguro que todo el mundo en sus empresa tiene algún router cisco.

Y en una empresa con mas de una sede conectaremos las sedes entre si para poder tener acceso a los diferentes recursos de cada una de estas sedes, para poder compartir recursos impresoras, servidores documentales etc... De esta manera evitamos que el usuario accede directamente a Internet, y nos evitamos problemas de seguridad...

Para conectar estas sedes lo hacemos creando un tunel desde el router de una sede hasta la otra, y encapsulando todo el trafico que pasa a traves de este túnel. El proceso a seguir sería similar en los dos routers..

Enseñaremos como configurar el ROUTER1 ya que los pasos a seguir son iguales en el ROUTER2 pero cambiando las IPs...

------------------------------------------------

Surely everybody at their company have one or more cisco routers.

Normally, at least in a company with more than one branch, we will interconnect the different offices in order to share resources as printers, servers, etc. If we proceed this way we will avoid the user to access directly to Internet, and we will also prevent security problems

To interconnect these offices we will do it using a tunnel, from one router to the other, and encapsulating all the traffic that is passing through this tunnel. We will proceed similar in both routers.

We will show how to configure the router 1, the steeps in ROUTER2 are the same but changing the IPs



1-Crearemos una interficie virtual
- Le asginaremos una ip privada
- Además le diremos que el origen del túnel es nuestra ip publica (la del router 1) y el destino la ip pública del otro router (el router 2)
-Lo configuraremos con la orden keepalive para que la interface virtual este activa
- Y añadiremos una descripción a la interfaz para identificarla fácilmente

1- Create a virtual interface
-Assign a private IP
-We tell the router1, that our puclic ip is the source of the tunnel, and the public ip of router 2, is the destination
- We will configure the virtual interface with the instruction keepalive to avoid this interface to shutdown.
- Add a description on this interface, to identify it easyly

interface Tunnel1
description Tunnel London - Madrid
ip address 10.10.10.1 255.255.255.0
keepalive 10 3
tunnel source 185.13.6.80
tunnel destination 200.102.52.12


2-Añadiremos las rutas al router, en la que le diremos a traves de que ip tiene que acceder a la red privada del router 2 (192.168.2.0 /24)

2- We wil add the routes in the router, and we will tell the router how to access to the private Lan at router 2 (192.168.2.0 /24)

ip route 192.168.2.0 255.255.255.0 Tunnel1


3-Añadiremos una linea a la access list ded la interficie fisica del router para permitr el tráfico hacia la red destino del router 2 (192.168.2.0/24)

3- Add a line in access list at the phisic interface to permit the traffic

access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
Procedeis de igual en el router dos pero cambiando las IPs
Proceed the same at the router 2 but changing the IPs

P.D.: Esto solo pretende ser una miniguia, para enseñaros como proceder y daros alfguna idea, ya que cada router puede estar configurado de una manera diferente... o tener IOS que hagan que los comandos sean diferentes.

P.S.: This is only a miniguide, to show you how to proceed, or give you some ideas. As each router can be configured in a different way, or have a different IOS which may lead in the use of differents commands.


Estafa en cajero automatico // Fraud in ATM machine














¿Te hubieras dado cuenta de esta estafa? Desde luego es fascinante los chorizo, mangantes i demás personajes del gremio se estan refinando cada vez más.

El artefacto se acopla perfectamente al cajero como se puede ver.

Y además lleva una cámara para poder ver el número secreto del pardillo que pase por el cajero

¿QUE PENSAIS?

-------------------------------------------------------

Will you notice this fraud in ATM machine.

This artifact fits perfectly in the ATM, as you can see in the photo.

And had also installed a video cam, to see the secret numbers of the naive person, that goes to the bank in this moment..

What do you think?


China VS Google


Parece que la gota que ha colmado la paciencia han sido unos ataques informaticos (por hackers) que ha sufrido la compañía de Montain View (bueno ha decir verdad ella y unas 34 grandes corporaciones más de todo el mundo).

La verdad es que si tes pones ha pensar hace gracia esta actitud de Google, si te vas a un país como China gobernada por una férrea dictadura, las reglas del juego son impuestas, y por supuesto, no por la compañía del buscador.

Sin embargo no molesto a esta misma compañía entregar datos sobre los usuarios de google (gmail,etc..) en China (que logicamente deberían ser privados), INCLUSO SABIENDO QUE HABRÍA PERSONAS QUE SERÍAN ENCARCELADAS O CONDENADAS A MUERTE POR LA INFORMACIÓN FACILITADA. Pero esta claro que como esto no afectaba directamente a los intereses comerciales de google en China, no vieron que hubiera mayor problema en facilitar estos datos a las autoridades chinas. Es posible que afectara a la imagen de Google en el resto del mundo, pero el mercado Chino (1400 millones de persona), bien merece olvidarse de la ética.

Ahora parece, que el ataque que ha sufrido Google, iba dirigido a obtener información sensible de la compañía, secretos comerciales.... esto ya si que pica y ahora amenazan con retirarse del país. Pero, porque a nadie le dio por hacer la absurda reflexión de que un no país no democrático, emplearían medios que en cualquier lugar del mundo serían ilegales.

Muy bien por vuestra parte habéis dañado la buena imagen de Google, y ahora si os vais de China habréis perdido la razón por la que no os importo dañarla, el goloso mercado chino. Y POR SUPUESTO NO ES AHORA QUE TIENES QUE AMENAZAR CON IRTE DE CHINA,DEBIÓ SER ANTES!!! VIVA LAS DECISIONES RESPONSABLES!!!

¿QUE OPINÁIS SOBRE ESTE TEMA?
---------------------------------------------

It seems, that the company from Montain view, is really angry due to several computer attacks. (Well google, and other 34 important corporation)

To be be honest, it seems funny to me the actitude of Google, if you go China that is goberned by strong dictatorship, the rules of the games are imposed, and of course not imposed by the searcher company.

Although, Google wasn´t really bother when the delivered information about the google (gmail, etc..) users in china (that everybody thinks should be secret). But of couse as the comercial interest wasnt´affected by this, they saw no problem to provide this information to the chinese authorities, EVEN WHEN THEY PROBABLY KNEW THAT SOME PEOPLE WILL BE IMPRISONED OR KILL FOR THIS INFORMATION. But of couse as the comercial interest wasn´t affected by this they saw no problem in this.

But now, the thing is different the attacks Google suffered were organised to obtain important information. So is when the company threatens to leave China. But why nobody made the absurd reflexion, that in a non democratical country, they will use methods that in other place over the world will be sure illegal.

But ok, you have damage the good image Google had, and now if you decide to leave China, you will also lose the reason for whom you weren´t affected to damage this good image, the chinese market. OF COURSE, IT IS NOT NOW WHEN YOU HAVE THREATEN TO LEAVE CHINA, IT MUST BE BEFORE!!! CHEER FOR THE RESPONSIBLE DECISSIONS!!

WHAT DO YOU THING ABOUT THIS?

Frase del día

La política es el arte de buscar problemas, encontrarlos, hacer un diagnostico falso y aplicar después los remedios equivocados.

Groucho Marx (1870 - 1977)

Mejorar rendimiento SQLSERVER // Improve SQLSERVER performance



Buenos vamos a ello, la primera entrada de verdad. Como ya dije hare algunos artículos para la gente más técnica, y que me imagino a alguno ayudaran. Son de esas cosas que a uno le cuesta encontrar por internet, y que son bastante útiles.

En este articulo voy a copiar un script que ayudará a toda aquella gente que es administrador de sqlserver o que ha desarollado aplicaciones para SQLSERVER. Este script en T-SQL hace los siguiente:
  1. Busca todos los indices de la BBDD en la que se ejecute el script
  2. Mira el estado de fragmentación de los Indices
  3. Si el indice está fragmentado menos o igual de un 10% no hace nada
  4. Si el indice en cuestión está fragmentado de un 10% - 30% lo reindexa
  5. Si el indice tiene un estado de fragmentación mayor a un 30% lo reconstruye
Una vez ejecutado el script notareis un mejora importante en el rendmiento de vuestras bases de datos y vuestras aplicaciones.

(El script es la parte en rojo)
--------------------------------------------

Well lets go, honestly this is the first article. As I told, I will blog some technical entries, that I suppose that will help somebody (or at least this is my intention). Things that are difficult to find in the Web, but they are really useful.

This article is about a T-SQL script for SQLSERVER that will help database administrator, or even the people who have an application running on a SQLSERVER database. This T-SQL scripts do the following:

  1. Find all the indexes on the selected database
  2. Check the state of fragmentation of the indexes
  3. If the index is fragmented equal o below 10% makes nothing
  4. It the fragmentation of the index is between 10% - 30% it will be reindexed
  5. If the fragmentation of the index is above 30% it will be rebuild
Once you do this you will notice a dramatically improvement in the database and your application.

(The script is the part in RED)
-----------------------------------------------


USE --DATABASENAME
SET NOCOUNT ON;
DECLARE @objectid int;
DECLARE @indexid int;
DECLARE @partitioncount bigint;
DECLARE @schemaname nvarchar(130);
DECLARE @objectname nvarchar(130);
DECLARE @indexname nvarchar(130);
DECLARE @partitionnum bigint;
DECLARE @partitions bigint;
DECLARE @frag float;
DECLARE @command nvarchar(4000);
-- Conditionally select tables and indexes from the sys.dm_db_index_physical_stats function
-- and convert object and index IDs to names.
SELECT
object_id AS objectid,
index_id AS indexid,
partition_number AS partitionnum,
avg_fragmentation_in_percent AS frag
INTO #work_to_do
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL , NULL, 'LIMITED')
WHERE avg_fragmentation_in_percent > 10.0 AND index_id > 0;

-- Declare the cursor for the list of partitions to be processed.
DECLARE partitions CURSOR FOR SELECT * FROM #work_to_do;

-- Open the cursor.
OPEN partitions;

-- Loop through the partitions.
WHILE (1=1)
BEGIN;
FETCH NEXT
FROM partitions
INTO @objectid, @indexid, @partitionnum, @frag;
IF @@FETCH_STATUS <>
SELECT @objectname = QUOTENAME(o.name), @schemaname = QUOTENAME(s.name)
FROM sys.objects AS o
JOIN sys.schemas as s ON s.schema_id = o.schema_id
WHERE o.object_id = @objectid;
SELECT @indexname = QUOTENAME(name)
FROM sys.indexes
WHERE object_id = @objectid AND index_id = @indexid;
SELECT @partitioncount = count (*)
FROM sys.partitions
WHERE object_id = @objectid AND index_id = @indexid;

-- 30 is an arbitrary decision point at which to switch between reorganizing and rebuilding.
IF @frag <>
SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REORGANIZE';
IF @frag >= 30.0
SET @command = N'ALTER INDEX ' + @indexname + N' ON ' + @schemaname + N'.' + @objectname + N' REBUILD';
IF @partitioncount > 1
SET @command = @command + N' PARTITION=' + CAST(@partitionnum AS nvarchar(10));
EXEC (@command);
PRINT N'Executed: ' + @command;
END;

-- Close and deallocate the cursor.
CLOSE partitions;
DEALLOCATE partitions;

-- Drop the temporary table.
DROP TABLE #work_to_do;
GO

Año nuevo vida nueva... // New Year New Life...

Hace bastante tiempo que no blogueaba, la verdad es que en estos últimos tres años, la vida me ha cambiado bastante... (cambio de trabajo, casa y algunas otras cosas

Me he hecho el sano propósito de bloguear un par de veces a la semana, y si la vagancia no me puede intentaremos publicar los articulos en castellano e ingles.... en fin ya veremos si esto solo queda en una de estas ideas que se hace siempre uno al principio de un nuevo año.

Para empezar he añadido el mapilla de la derecha al blog asi podremos ver todos de que partes del mundo es la gente que visita el blog :-)

--------------------------------------------------------

It is long time ago since the last time I blog, certainly my life has changed a lot during the last three years (new job, house, and some other things..)

I have the good intention to blog some times a week if the lazziness doesn´t beat me.. and I will also try to write the articles int Spanish and English... well lets see it this is just one of those good intentions that we have at the beginining of a new year.

To begin, I have add a map that will show everybody the country of origin of the people who visit the blog :-)

Frase del día

La cosa más difícil es conocernos a nosotros mismos; la más fácil es hablar mal de los demás.
Tales de Mileto (624 AC-546 AC) Filósofo y matemático griego.