Configuring iptables on CentOS

– disable SELINUX

vi /etc/selinux/config

– reboot or run

 setenforce 0

– add iptables rules

Change server hostname

Check Installing CentOS 6.2 on VMware post.

Adding Hostname to Linux server

vi /etc/hosts
# add  localhost.localdomain localhost centos6.vmware.local
vi /etc/sysconfig/network
hostname centos6.vmware.local

Useful Linux commands

Check Installing CentOS 6.2 on VMware post.

– getting full memory info

more /proc/meminfo

– display memory usage in MB

free -m

Installing CentOS 6.2 on VMware

This is a step by step tuturial for installing CentOS 6.2 64bit on VMware 7.0.1 build-227600 running on Windows 7

– downoad the iso DVD from ( need only CentOS-6.2-x86_64-bin-DVD1.iso for this installation )

– Open VMware and follow the slide

Using iptables to block ips that spam or attack your server

Check Configuring iptables on CentOS post.

Why should you do that while APF or CSF can do it automatically?
Because APF/CSF could block an important bot testing your server to add to search index. So reviewing every ip would be a daily task!
Ok, so how?
using RHEL4, centos4