Wednesday, August 22, 2007

make yr linux server become syslog server

modify the following in the /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-r -m 0"

insert iptables log into /var/log/iptables

insert the following into /etc/syslog.conf
#Log iptables stuff to iptables log
kern.=debug /var/log/iptables


on iptables files, use
iptables -A INPUT -p tcp -j LOG --log-tcp-options --log-level debug --log-prefix "INPUT packets"

Saturday, August 11, 2007

only allow from source IP on apache

file under .htaccess
Order deny,allow
Deny from all
Allow from IP_ADDRESS