#!/bin/sh # # /etc/rc.d/rc.local: Local system initialization script. # # Put any local startup commands in here. Also, if you have # anything that needs to be run at shutdown time you can # make an /etc/rc.d/rc.local_shutdown script and put those # commands in there. # # # IP for the webserver /sbin/ifconfig eth0:1 207.32.241.203 broadcast 207.32.241.207 netmask 255.255.255.248 # # # PURE FTP Server chroot with users stored in either mysql or shadow file /usr/local/sbin/pure-ftpd -A -B -C 2 -E -i -I 2 -R -s -x -X -Z -l mysql:/etc/pureftpd.conf -l unix # # # Slow down the ssh slamming /usr/sbin/iptables -A INPUT -p tcp -i eth0 -s 207.32.241.0/24 --dport 22 -j ACCEPT /usr/sbin/iptables -A INPUT -p tcp -i eth0 -m state --state NEW --dport 22 -m recent --update --seconds 15 -j DROP /usr/sbin/iptables -A INPUT -p tcp -i eth0 -m state --state NEW --dport 22 -m recent --set -j ACCEPT # # # Block some known bad peeople /usr/sbin/iptables -A INPUT -s 213.132.163.46 -j DROP /usr/sbin/iptables -A INPUT -s 86.91.111.226 -j DROP /usr/sbin/iptables -A INPUT -s 212.127.141.23 -j DROP /usr/sbin/iptables -A INPUT -s 77.251.7.198 -j DROP /usr/sbin/iptables -A INPUT -s 85.17.45.1 -j DROP /usr/sbin/iptables -A INPUT -s 66.167.100.122 -j DROP #/usr/sbin/iptables -A INPUT -s phcksec.org -j DROP #/usr/sbin/iptables -A INPUT -d phcksec.org -j DROP # # # Sync clock on boot #netdate tcp tock.greyware.com ntp0.cornell.edu /sbin/ifconfig eth0:2 10.100.0.70 broadcast 10.100.0.255 netmask 255.255.255.0