本文摘自PHP中文网,作者黄舟,侵删。
本篇文章主要介绍了详解Linux系统如何低于TCP洪水攻击,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | net.ipv4.tcp_synack_retries = 0
net.ipv4.tcp_max_syn_backlog = 200000
fs. file -max = 819200
net.core.somaxconn = 65536
net.core.rmem_max = 1024123000
net.core.wmem_max = 16777216
net.core.netdev_max_backlog = 165536
net.ipv4.ip_local_port_range = 10000 65535
|
注意,以下参数面对外网时,不要打开。因为副作用很明显,具体原因请google,如果已打开请显式改为0,然后执行sysctl -p关闭。因为经过试验,大量TIME_WAIT状态的连接对系统没太大影响:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_syncookies = 0
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_tw_recycle = 0
|
为了处理大量连接,还需改大另一个参数:
在底下添加一行表示允许每个用户都最大可打开409600个文件句柄(包括连接):
以上就是Linux系统如何防止TCP洪水攻击的方法介绍的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
Linux 版本区别
Linux文件目录结构
Linux中rpm是什么意思
Linux如何更新系统
Linux如何查看主机名
Linux创建软链接失败
Linux如何上网
Linux如何查看文件的第几行到第几行
Linux find命令的用法有哪些
Linux系统加固方法介绍
更多相关阅读请进入《Linux》频道 >>
转载请注明出处:木庄网络博客 » Linux系统如何防止TCP洪水攻击的方法介绍