Category Archives: Linux

iptables error: restorecon command not found

Saving iptables rules:

iptables: Saving firewall rules to /etc/sysconfig/iptables:
/etc/init.d/iptables: line 268: restorecon: command not found [FAILED]

This error mainly occurs due to misisng restorecon file.

restorecon is provided by policycoreutils package. You can try uninstalling and
re-installing policycoreutils package and see if you get restorecon file under /sbin

Installing policycoreutils package:

root@server [~]# yum install policycoreutils

Post to Twitter

ip_conntrack: table full,dropping packet

[error]ip_conntrack: table full, dropping packet[/error]

ip_conntrack is an iptables module which limits number of simultaneous connections your system can have.

If this connections are exceed, then your server may not respond to  ping and ssh.

by default a linux Cent OS server have 65536 connection.


Today I faced same issue with my server.  and Fixed for the same was increasing the limit.


You can refer to following tutorials:

Check current limit:

# sysctl net.ipv4.netfilter.ip_conntrack_max

Increase this limit to e.g. 75536, type

sysctl -w net.ipv4.netfilter.ip_conntrack_max=75536

To check current open session, execute following command.

wc -l /proc/net/ip_conntrack

Post to Twitter


Change timezone on dedicated server

Change timezone on CentOS

If you have CentOS/RHEL Server then you can fallow following steps:

1) SSH the server as root.

All Time zone configuration files are located under directory /usr/share/zoneinfo/

Example: Say your current server time is in GMT Format and you want to change it to IST time.

cp /usr/share/zoneinfo/Asia/Calcutta     /etc/localtime

Thats all

Post to Twitter


Install wine on CentOS

Wine is a free software application that aims to allow computer programs written for Microsoft Windows to run on Unix-like  operating systems. Wine also provides a software library, known as Winelib, against which developers can compile  Windows applications to help port them to Unix-like systems.

SSH the server as root and refer to following steps to install wine on centos server.

1) Installing rpmforge rpm.

root@server [~]# cd /usr/local/src/

root@server [/usr/local/src]# wget


2) Install the rpmforge rpm.

root@server [/usr/local/src]# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

3)  Install wine.

root@server [/usr/local/src]#yum install wine -y enablerepo=rpmforge

4) Launch Wine from the Centos Applications menu.


That’s All.

Post to Twitter

boot Ubuntu into single user mode

Booting UBUNTU into single user mode is slightly different then CENTOS.

1) Hold the Shift key at boot to display the Grub boot menu. If you fail to press Shift key then you will not see boot menu
2) Select the first Grub entry, it will be similar to:

Ubuntu, with Linux 2.6.32-22-generic-pae

3) Press e to edit the the Grub entry.
4) Now you can look for the line similar to following:

linux /boot/vmlinuz-2.6.32-22-generic-pae
ro vga=794 quiet splash

5) Go to the end of the line and change the line to so it looks like following:

linux /boot/vmlinuz-2.6.32-22-generic-pae
init=/bin/bash rw

6) Now Hit crtl+x to boot the server into single user mode.

Thats All 🙂

Post to Twitter