June 2012
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

June 2012
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Reducing Swap on an LVM2 Logical Volume

Reducing Swap on an LVM2 Logical Volume 1) Check swap space and its utilization cat /proc/swaps # free

2) Scan (all disks) for Logical Volumes lvscan

[root@localhost ~]# lvscan ACTIVE ‘/dev/VolGroup/lv_root’ [47.44 GiB] inherit ACTIVE ‘/dev/VolGroup/lv_home’ [46.19 GiB] inherit ACTIVE ‘/dev/VolGroup/lv_swap’ [5.88 GiB] inherit

3) Disable devices and files for paging and swapping swapoff […]

Centos 6 SFTP chroot Jail

Centos 6 SFTP chroot Jail

User and Group setup

First you will want to establish the sftponly group

groupadd sftponly

Then create the user with the correct home directories and group

useradd -d /var/www/vhosts/bob -s /bin/false -G sftponly bob

Don’t forget at this point to also add password to these new accounts.

SSHd configuration […]

Shorewall – Firewall

CentOS – Install and Configure Shorewall

Add repository EPEL that is provided from Fedora project. wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6 rpm –import RPM-GPG-KEY-EPEL-6 rm -f RPM-GPG-KEY-EPEL-6 vi /etc/yum.repos.d/epel.repo # create new [epel] name=EPEL RPM Repository for Red Hat Enterprise Linux baseurl=http://ftp.riken.jp/Linux/fedora/epel/6/$basearch/ gpgcheck=1 enabled=0 # when you use the repository, input yum command like follows

yum –enablerepo=epel install […]

Configure Advanced Policy-based Firewall (APF), Brute Force Detection (BFD), DDoS Deflate

Configure Advanced Policy-based Firewall (APF), Brute Force Detection (BFD), DDoS Deflate

Advanced Policy Firewall

Description: Advanced Policy Firewall (APF) is an iptables(netfilter) based firewall system designed around the essential needs of today’s Linux servers. The configuration is designed to be very informative and easy to follow. The management on a day-to-day basis is […]

IPTABLES Firewall on Centos

Firewall on Centos OS

#!/bin/sh # #

## Set your IP address MYIP=”192.168.1.108″ # ## Flush rules & reset counters /sbin/iptables -F /sbin/iptables -Z # ## Set policies /sbin/iptables -P INPUT DROP /sbin/iptables -P FORWARD DROP /sbin/iptables -P OUTPUT DROP # ## Drop all incoming fragments /sbin/iptables -A INPUT -i eth0 -f -j DROP […]