Archive for the ‘HowTo’ Category

VPN openvpn howto linux

November 17th, 2016 No comments

yum install -y openvpn
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE
cd /etc/openvpn/
openvpn –genkey –secret vpn.key
vi openvpn.conf
port 8080
proto tcp-server
dev tun1
status server-tcp.log
verb 4
secret vpn.key

Categories: HowTo Tags: , ,

Reverse SSH Tunnel

November 14th, 2016 No comments

The idea is to have my IP autostart connect to my Cloud server,
this way I can remote control my Raspberry PI without having to configure DynDNS and firewall rules.
The only requsisite is that PI has internet and run a simple script on startup to estabilish the SSH tunnel

Read more…

Cisco auto login script

September 29th, 2016 No comments

Maybe you need to login in 500 differente switches and execute a command.

here is the solution:

Categories: Linux, Uncategorized Tags:

Nagios Notify html Script

September 29th, 2016 No comments

The default notification script for nagios is very simple, why not get more information on the email. Like: hostgroup, how long has the problem happened, link to the possible documentation. And format it in a nice html table.

Read more…

check hp array disk

September 21st, 2016 No comments

check HP array disks modified script to fix Upgrade situations

Read more…

Categories: bash, HowTo, Linux Tags:

embed github code in wordpress

September 15th, 2016 No comments

This is the simples way to embed a file from a github repository to your webpage/blog


Read more…

Categories: HowTo Tags: , ,

webinject auto create config

September 15th, 2016 No comments

Script to auto create webinject xml config files from a list of URL


Read more…

Categories: bash, HowTo, Linux Tags:

How to force ntpd time sync

September 14th, 2016 No comments

How to force time sync
Find out your ntpd servers:

grep server /etc/ntp.conf
service ntpd stop
ntpdate -s
service ntpd start

Read more…

Categories: HowTo, Linux Tags: , , , , ,

Can’t locate Sys/Statistics/

August 5th, 2016 No comments

When using on Centos 7 I got a known error but not so easy to fix…

# su – nrpe -c “/usr/lib64/nagios/plugins/ -C -w 90% -c 95%”
Can’t locate Sys/Statistics/ in @INC (@INC contains: /usr/lib64/nagios/plugins /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/lib64/nagios/plugins/ line 33.
BEGIN failed–compilation aborted at /usr/lib64/nagios/plugins/ line 33.

Read more…

Categories: Linux Tags: , ,

Access log to DB

May 24th, 2016 No comments

This script loads tomcat or apache logs into a mysql database.

Here is the code:

# 2015-03-04 Nereu - versao Tomcat

Categories: HowTo, Linux Tags: