hdparm -d1 -A1 -m16 -u1 -a64 /dev/hda
mount tmpfs /dev/shm -t tmpfs -o size=512m
mkdir /dev/shm/tmp
chmod 1777 /dev/shm/tmp
mount --bind /dev/shm/tmp /tmp
iptables -A FORWARD ! -i eth0 -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT ! -i eth0 -m state --state NEW -j ACCEPT
iptables -A INPUT ! -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -o eth1 -s 10.17.162.0/24 -j SNAT --to 61.138.211.234
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
/etc/init.d/squid start
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
阅读(1388) | 评论(0) | 转发(0) |