Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÈÃLinuxϵͳ·ÀÖ¹syn¹¥»÷

ÐéÄâÖ÷»ú·þÎñÉÌÔÚÔËÓª¹ý³ÌÖпÉÄÜ»áÊܵ½ºÚ¿Í¹¥»÷£¬³£¼ûµÄ¹¥»÷·½Ê½ÓÐSYN£¬DDOSµÈ¡£Í¨¹ý¸ü»»IP£¬²éÕÒ±»¹¥»÷µÄÕ¾µã¿ÉÄܱܿª¹¥»÷£¬µ«ÊÇÖжϷþÎñµÄʱ¼ä±È½Ï³¤¡£±È½Ï³¹µ×µÄ½â¾ö·½·¨ÊÇÌíÖÃÓ²¼þ·À»ðǽ¡£²»¹ý£¬Ó²¼þ·À»ðǽ¼Û¸ñ±È½Ï°º¹ó¡£¿ÉÒÔ¿¼ÂÇÀûÓÃLinux ϵͳ±¾ÉíÌṩµÄ·À»ðǽ¹¦ÄÜÀ´·ÀÓù¡£
µÖÓùSYN SYN¹¥»÷ÊÇÀûÓÃTCP/IPЭÒé3´ÎÎÕÊÖµÄÔ­Àí£¬·¢ËÍ´óÁ¿µÄ½¨Á¢Á¬½ÓµÄÍøÂç°ü£¬µ«²»Êµ¼Ê½¨Á¢Á¬½Ó£¬×îÖÕµ¼Ö±»¹¥»÷·þÎñÆ÷µÄÍøÂç¶ÓÁб»Õ¼Âú£¬ÎÞ·¨±»Õý³£Óû§·ÃÎÊ¡£
LinuxÄÚºËÌṩÁËÈô¸ÉSYNÏà¹ØµÄÅäÖã¬ÓÃÃüÁ sysctl -a | grep syn ¿´µ½£º
net.ipv4.tcp_max_syn_backlog = 1024 net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_synack_retries = 5 net.ipv4.tcp_syn_retries = 5
tcp_max_syn_backlogÊÇSYN¶ÓÁеij¤¶È£¬tcp_syncookiesÊÇÒ»¸ö¿ª¹Ø£¬ÊÇ·ñ´ò¿ªSYN Cookie ¹¦ÄÜ£¬¸Ã¹¦ÄÜ¿ÉÒÔ·ÀÖ¹²¿·ÖSYN¹¥»÷¡£tcp_synack_retriesºÍtcp_syn_retries¶¨ÒåSYN µÄÖØÊÔ´ÎÊý¡£¼Ó´óSYN¶ÓÁг¤¶È¿ÉÒÔÈÝÄɸü¶àµÈ´ýÁ¬½ÓµÄÍøÂçÁ¬½ÓÊý£¬´ò¿ªSYN Cookie¹¦ÄÜ¿ÉÒÔ×èÖ¹²¿·Ö SYN¹¥»÷£¬½µµÍÖØÊÔ´ÎÊýÒ²ÓÐÒ»¶¨Ð§¹û¡£
µ÷ÕûÉÏÊöÉèÖõķ½·¨ÊÇ£º
Ôö¼ÓSYN¶ÓÁг¤¶Èµ½2048£º
sysctl -w net.ipv4.tcp_max_syn_backlog=2048
´ò¿ªSYN COOKIE¹¦ÄÜ£º
sysctl -w net.ipv4.tcp_syncookies=1
½µµÍÖØÊÔ´ÎÊý£º
sysctl -w net.ipv4.tcp_synack_retries=3 sysctl -w net.ipv4.tcp_syn_retries=3
ΪÁËϵͳÖØÆô¶¯Ê±±£³ÖÉÏÊöÅäÖ㬿ɽ«ÉÏÊöÃüÁî¼ÓÈëµ½/etc/rc.d/rc.localÎļþÖС£
 
# vi /etc/sysctl.conf
 
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_rmem = 32768
net.ipv4.tcp_wmem = 32768
 
·Àֹͬ²½°üºéË®£¨Sync Flood£©
# iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
Ò²ÓÐÈËд×÷
#iptables -A INPUT -p tcp --syn -m limit --limit 1/s -j ACCEPT
--limit 1/s ÏÞÖÆsyn²¢·¢ÊýÿÃë1´Î£¬¿ÉÒÔ¸ù¾Ý×Ô¼ºµÄÐèÒªÐÞ¸Ä
·ÀÖ¹¸÷Öֶ˿ÚɨÃè
# iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT
PingºéË®¹¥»÷£¨Ping of Death£©
# iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCE


Ïà¹ØÎĵµ£º

LinuxÏÂTrac°²×°±Ê¼Ç

²Î¿¼ÍøÖ·£º
http://trac.edgewall.org/wiki/TracInstall
http://trac.edgewall.org/wiki/TracInstallPlatforms
http://trac.edgewall.org/wiki/TracOnRhel5
http://dag.wieers.com/rpm/FAQ.php#B
http://tech.idv2.com/2008/12/26/install-trac-on-linux/
Èí¼þÏÂÔصØÖ·£º
trac:http://trac.edgewall.org/wiki/TracDo ......

¡¶Linux diffÓëpatchµÄÉîÈë·ÖÎö¡·

diffµÄÊä³ö¸ñʽ·ÖΪ´«Í³¸ñʽºÍͳһ¸ñʽ
1)diffµÄ´«Í³¸ñʽÊä³ö.
############################################
cat before.txt
Êä³ö:
This is a line to be deleted
This is a line that will be changed
This is a line that will be unchanged
cat after.txt
Êä³ö:
This is a line that has been changed
Thi ......

LinuxÖÐRCU»úÖƵÄÔ­Àí

Ô­ÎÄÍøÖ·£ºhttp://group.ednchina.com/1036/21283.aspx
 RCU»úÖÆÊÇLinux2.6Ö®ºóÌṩµÄÒ»ÖÖÊý¾ÝÒ»ÖÂÐÔ·ÃÎʵĻúÖÆ£¬´ÓRCU£¨read-copy-update£©µÄÃû³ÆÉÏ¿´£¬ÎÒÃǾÍÄܶÔËûµÄʵÏÖ»úÖÆÓÐÒ»¸ö´ó¸ÅµÄÁ˽⣬ÔÚÐÞ¸ÄÊý¾ÝµÄʱºò£¬Ê×ÏÈÐèÒª¶ÁÈ¡Êý¾Ý£¬È»ºóÉú³ÉÒ»¸ö¸±±¾£¬¶Ô¸±±¾½øÐÐÐ޸ģ¬ÐÞ¸ÄÍê³ÉÖ®ºóÔÙ½«ÀÏÊý¾Ýupdate³ÉеÄÊý¾Ý£¬´ ......

linux쵀fastcopy

ÔÚ¿½±´Êý¾ÝµÄʱºò£¬Èç¹ûÓöµ½Ò»¶ÑСÎļþ£¬¼´Ê¹×ÜÊý¾ÝÁ¿ºÜС£¬¿½±´Ò²»áºÜ·Ñʱ£¬ÔÚwinÏ£¬ÓÐÒ»¸öÈí¼þ½Ðfastcopy£¬¿ÉÒÔʵÏÖ¿ìËÙ¿½±´£¬¾Ý˵ʹÓÃÁËÒ»ÖÖ½ÐÄÚ´æÓ³ÉäµÄ¼¼Êõ£¬ÄÇôÔÚLinuxÏÂÓÐûÓÐÄØ£¿
ÎÒÕÒÁË°ëÌ죬ԭÀ´LInuxϸù±¾²»ÐèÒªµ¥¶ÀµÄÈí¼þ£¬ÓÃÏÖÓеÄÃüÁî×éºÏ¾ÍOKÁË£¡
ÓиßÊÖÔÚÁ½¸ö·þÎñÆ÷¼ä´«Êý¾Ý£¬Ê¹ÓÃÃüÁʵÏÖÁË¿ìËÙ´«Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ