Category Archives: Linux

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

How To Rotate IP Address Pool In Linux (Redhat / Centos / Ubuntu / Debian)

You can rotate your Server IP address pool in Linux server by using iptable NAT Postrouting. I assume you have 8 public IP addresses (x.x.x.1 TO x.x.x.8) configure on Linux postfix server. Now we rotate only SMPT (port no. 25) … Continue reading

Posted in Exim, Linux, Mail server, Plesk, Postfix | Leave a comment

Install FFmpeg on CentOS or RedHat EL 6.x

Install FFmpeg on CentOS or RedHat EL 6.x If you are upgrading from a previous version of Razuna you should always update your ImageMagick, Exiftool and  Ffmpeg installation! Install the additional repo Install all necessary packages Install xvid Install LibOgg Install Libvorbis … Continue reading

Posted in Apache, Linux | Leave a comment