UNIX BLOG

Blog for NIX system based administrators

Filter ICMP Timestamp Requests using IPtables

The following commands filter ICMP requests /sbin/iptables -I INPUT 1 -p ICMP –icmp-type timestamp-request -j DROP The following commands filter ICMP Reply requests /sbin/iptables -I INPUT 1 -p ICMP –icmp-type timestamp-reply -j DROP For autorun place the commands in /etc/rc.conf file or rc.local depending on your operating system.

Posted in Linux Administration | No Comments

How to find out what programs are listening on ports

The following code will show how to see all the programs that are listening: netstat -tulpn will show what programs are listening on ports. Example: root@myhost:~# netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2393/mysqld tcp 0 0 127.0.0.1:8080 0.0.0.0:* […]

Posted in Linux Administration | No Comments

Laravel header footer layout

For using a standart header and footer for every page in Laravel Framework, we need to define a layout. This article will describe to you, how to setup a layout with header and footer in LARAVEL framework for PHP in 7 STEPS 1 STEP: Define a layout, make a directory: app/views/layouts 2 STEP: Create a […]

Posted in php coding | No Comments

Convert openvz to xen VPS centos or debian

mv /etc/init.removed /etc/init/ chroot /mnt apt-get install mingetty yum install mingetty # hvc0 – mingetty # # This service maintains a getty on tty1 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/mingetty hvc0 nano etc/init/hvc0.conf nano /etc/fstab […]

Posted in Linux Administration | No Comments

mdadm sending ioctl 1261 to a partition!

mdadm sending ioctl 1261 to a partition!  and probably failing of one HDD drive If you get this message in linux mdadm config. Then you need to check mdadm settings with the following command: cat /proc/mdstat If you got cat   /proc/mdstat Personalities : [raid1] md2 : active raid1 sda3[0]       935745400 blocks super 1.2 […]

Posted in Linux Administration | No Comments

VPN PPTP not all sites are loading, problems with mtu

VPN PPTP not all sites are loading, problems with mtu to solve this problem about pptpd mtu problem with not all sites working use the following command: /sbin/iptables –append FORWARD –protocol tcp –tcp-flags SYN,RST SYN –jump TCPMSS –clamp-mss-to-pmtu

Posted in Linux Administration | No Comments

how to install anti-dos mod_evasive centos 5

Желательно использовать модуль mod_evasive совместно с nginx. Nginx будет обрабатывать статические запросы, а mod_evasive фильтровать тяжелые пхп запросы для апаче. Подключаем epel репозиторий, где и хранится mod_evasive wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm устанавливаем: yum install mod_evasive Редактируем конфиг nano /etc/httpd/conf.d/mod_evasive.conf      

Posted in Linux Administration | No Comments

Blank text in wordpress editor

If you have problems with standart editor in wordpress, the files is not uploaded. BLANK TEXT IN EDITOR. Just find this Plugin "CKEditor for WordPress" Install it , and replace the standart editor in WordPress. Now all the things on this page will be fixed. You will se something like this:  

Posted in Installation of Web-Scripts | No Comments

Install YII framework on XAMPP in windows 7

In tutorial it is said to use yyic webapp ../yourproject. But php.exe is not working.   1. Download and unzip the Yii framework: http://www.yiiframework.com/download/ 2. unzip it into the folder in your c:\xampp\httpdocs 3. go to cmd.exe (command promot)  and type: cd c:\xampp\htdocs\framework\ or c:\xampp\htdocs\yii\framework depending how the YII framework folder installed. type yiic webapp […]

Posted in Installation of Web-Scripts | 1 Comment

How to install geoip for php on gentoo

First install Geo-IP package emerge -v Geo-IP Install pecl geoip php5 package emerge -v dev-php5/pecl-geoip Check if all is installed correctly php -i | grep geo

Posted in Linux Administration | No Comments