在/etc/sysctl.conf中添加下面的参数
net.nf_conntrack_max = 655360
net.netfilter.nf_conntrack_tcp_timeout_established = 1200
net.ipv4.tcp_timestamps=1
net.ipv4.tcp_tw_recycle=1
net.netfilter.nf_conntrack_tcp_timeout_established = 1200
net.ipv4.tcp_timestamps=1
net.ipv4.tcp_tw_recycle=1
然后运行下面的命令就搞定了
sysctl -p /etc/sysctl.conf