« vsftpd - probably the most secure and fastest FTP server for UNIX-like systems |
Main
| 1. ip rule - iproute2 - the most powerful tool »
April 3, 2004
squid maintain sample . chaotic sample:(
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
https://windtear.net/archives/2004/04/03/000394.html
/etc/rc.d/rc3.d S25squid -> ../init.d/squid
/etc/rc.d/rc.local
IPTABLES=/sbin/iptables
$IPTABLES -N squid $IPTABLES -t filter -A INPUT -j squid -p tcp --dport $PORT
# auto deny tail -f /opt/old_access/access.log | /opt/old_access/autodeny.pl &
sh /etc/rc.d/_squid_deny.sh &
echo "1" > /proc/sys/net/ipv4/ip_forward echo "1" > /proc/sys/net/ipv4/tcp_syncookies
MODPROBE=/sbin/modprobe
$MODPROBE ip_nat_ftp $MODPROBE ip_nat_irc $MODPROBE ip_conntrack $MODPROBE ip_conntrack_ftp $MODPROBE ip_conntrack_irc
$MODPROBE iptable_filter $MODPROBE iptable_nat $MODPROBE ip_tables $MODPROBE ipt_MASQUERADE
sh /etc/rc.d/_nat_use.sh ^sh /etc/rc.d/_squid.sh ^$IPTABLES -t nat -A PREROUTING -s 192.168.0.0/16 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports $PORT
|
|
Posted by windtear at April 3, 2004 10:03 PM