Monthly Archives: October 2014

Some Shell Scripts

Shell Script to add zone to DNS server. NS1 = ns1.example.net NS2 = ns2.example.net #!/bin/bash # check to see if the script is being run as root or not grep=`which grep` rndc=`which rndc` if [ “$(id -u)” != “0” ]; … Continue reading

Posted in Linux, Shell Script | Leave a comment

Monitor linux services using bash script

# Vi check_httpd.sh #!/bin/sh run=`ps ax | grep /usr/local/apache/bin/httpd | grep -v grep | cut -c1-5 | paste -s -` if [ “$run” ]; then echo “apache is running” > /home/admin/check_httpd.log else /usr/local/apache/bin/apachectl -k restart mail -s “Apache server restarted … Continue reading

Posted in Apache, Linux, Optimize, Shell Script | Leave a comment

CentOs Fix for Bash Bug ( CVE-2014-6271 & CVE-2014-7169 )

Bash, aka the Bourne-Again Shell, has a newly discovered security hole which has been officially documented as CVE-2014-6271 & CVE-2014-7169. And, for many Unix or Linux Web servers, it’s a major problem. The flaw involves how Bash evaluates environment variables. … Continue reading

Posted in Linux | Leave a comment

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Today I saw an interesting error ,while restarting apache ======= ]# /etc/init.d/httpd restart shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Stopping httpd: [ OK ] Starting httpd: shell-init: error retrieving current directory: … Continue reading

Posted in Linux | Leave a comment

Heart Bleeding

One of the Google Security Engineer ( Thanks for Neel Mehta of Google Security and team of security engineers (Riku, Antti and Matti) at Codenomicon for discovering the bug)  reported a serious bug with current openssl  on 3rd of April 2014 . ( … Continue reading

Posted in Linux | Leave a comment

POODLE: SSLv3.0 vulnerability

What is POODLE ? POODLE stands for Padding Oracle On Downgraded Legacy Encryption. This vulnerability allows a man-in-the-middle attacker to decrypt ciphertext using a padding oracle side-channel attack. How to Fix ? At present there is no working patch for … Continue reading

Posted in Linux | Leave a comment

Setup mysql master slave replication over ssl

Master Server : 10.10.1.1 Slave Server : 10.10.1.2 Confirm your mysql server is compiled/enabled to support ssl connections using the following command # mysql -u root -p mysql > show variables like ‘%ssl%’ ; If you are getting an output … Continue reading

Posted in Linux, MySQL | Leave a comment