Topics

iptables

Nginx Error Log Reader

Nginx Error Log Reader is a php reader/parser/analyzer for Nginx error log file. the script is able to read error logs recursively then display them in a user friendly table. Script configuration includes the number of bytes to read per page and allow pagination through the error log . Additionally, table columns are sortable and full description of every error is displayed using MonnaTip.

For banning Ips, please refer to this post Using iptables to block ips that spam or attack your server

Configuring vsFTPd on CentOS with different port

Check Installing CentOS 6.2 on VMware post.

– make sure SELINUX is disabled and iptables is configured for FTP

– add ftp user

adduser ftpuser -g ftp -s /sbin/nologin -d /server
#set password
passwd ftpuser

– configuration, more info

Change SSH port and enable X11 forwarding

Check Installing CentOS 6.2 on VMware post.

– configure ssh port

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.old
vi /etc/ssh/sshd_config
#uncomment port 22 and change to
port 4568

– enable X11 forwarding

#install needed libraries
yum -y install xorg-x11-xauth xorg-x11-fonts-base liberation-fonts

vi /etc/ssh/sshd_config
#add
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

– restart sshd

 /etc/init.d/sshd restart

Now you should connect to 192.168.126.128:4568

Configuring iptables on CentOS

– disable SELINUX

vi /etc/selinux/config
#change
SELINUX=disabled

– 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
127.0.0.1  localhost.localdomain localhost
192.168.126.128 centos6.vmware.local
vi /etc/sysconfig/network
#change
HOSTNAME=centos6.vmware.local
hostname centos6.vmware.local