Zabbix Agent IPtables setup

iptables -I INPUT 1 -p tcp -s zabbix server IP-address –dport 10050 -j ACCEPT iptables -I OUTPUT 1 -p tcp -s zabbix server IP-address –dport 10051 -j ACCEPT Facebook0Twitter0Reddit0Linkedin0Stumbleupon0X

Modificar un patrón en columna SQL – Postgresql

postgresql

Se presenta el siguiente escenario, tenemos una tabla donde hospedamos rutas a archivos, esta información se guarda dentro de la tabla de la siguiente manera:

inmsweet_sistema=# SELECT foto1 from propiedades;
                        foto1
———————————————
../fotos/2san+miguel.jpg
../fotos/tumblr_mnkbly4H4i1qbltjyo1_500.jpg
../fotos/tumblr_mmkqzbJyGr1qijolto1_500.jpg
../fotos/tumblr_mnkbly4H4i1qbltjyo1_500.jpg
../fotos/1.jpg
(5 rows)

inmsweet_sistema=#

Read more

VIO servers and root account

Today i attended a case about VIO servers AIX is not a system you touch every day either VIO servers if you don’t know what VIO server are here is an extract about them from the IBM site:

VIO technology is based on the idea of having special LPARs that manage the disk and network resources that other LPARs use on the same pSeries or IBM System p servers. Instead of the individual network and disk resources being carved out on an LPAR-by-LPAR basis (especially in cases where there wouldn’t be sufficient resources for all the LPARs to possess what they require to function), one or two VIO servers are given control of these resources and share them out to the other LPARs (VIO client LPARs).

Read more

Carnavals from Hell

clownEntérate de como sucedió el ataque. No se si algunos se enteraron del ataque que recibimos acá en el Blog durante los carnavales. Pero si no te enteraste acá te muestro lo que sucedió y como fue corregida la falla ademas de algunas medidas que debemos tomar para asegurar nuestro WordPress sin necesidad de plugins ni programas extras. Bueno aquí vamos:

Read more

Magic commands

Here i will post all my favorite commands if you want to share others let me know: Check for DOS attacks netstat -anp|grep tcp|awk ‘{print $5}’| cut -d : -f1|sort|uniq -c|sort -n Find large files on UNIX find / -size +100000 -type f -ls | sort -n Create a  30×30 matrix hexdump -v -e ‘”%u”‘ … Read more

Script cambio de IP

Cuando se tiene un servidor que cambia de IP constantemente dado a que esta basado en una IP dinámica es difícil contar con el por que la única manera de saber cual es la IP que tiene es sentándote en frente de el y hacerle “ifconfig” para ver la dirección, ya se pueden imaginar las quejas ¿Cual es la ip del servidor? ¿No eran mejor las carpetas compartidas de Windows? LOL pues no! Claro si cuentas con un Network switch configurable simplemente asignas a una MAC una IP estática y se acabo el problema; el servidor tendrá siempre la misma IP; el caso es que no se cuenta con eso tampoco entonces para solucionar esto podemos hacer un Script que avise por correo si la IP cambio veamos como:

Read more

Work from Home

A co-worker had an accident and he needs to work from his house, when your computer is on a internal network and you need to access to it using something as VNC , as an network administrator and sys-admin you need to setup a few configs here and there for that to work. In this post i will show you how do i accomplished this requirement. As you may know  VNC server listen to new connections at port number 5900, you have to download and install the proper software in the computer that is going to act like a server using this link then you need to configure your router or modem to accept connections from outside and do some port forwarding, if  you don’t know how to do this don’t worry in this website there is all the info you need. In my case i was configuring a HUAWEI SMART-AX_MT882 to allow VNC connections so you can connect the router using some network cable , and using your web browser log into “192.168.1.1” of course your NIC has to be in the same network range so you can do something like this:

Read more

A network problem [study case]

So the other day i was doing some consulting a problem occur  in a network, causing a failure of inaccessibility to a server created by an application, in other words a client could not connect error type of thing, the client pays a consulter to actually tell him the solution of his problem, so whit that been said, i power on my laptop find some wire to plug in, open a terminal and start the digging (The real values of Ips address have been modified).

First i drop a traceroute to the IP address the client was trying to connect to and found this: