|
服务器版本
Distributor ID: Ubuntu
Description: Ubuntu 8.04.4 LTS
Release: 8.04
Codename: hardy
Kernel: 2.6.24-27-server
用dmesg看到很多udp checksum error的错误。如下
- [32437.881001] UDP: bad checksum. From 121.27.205.1:13223 to 61.178.231.X:13803 ulen 1056
- [32437.944654] UDP: bad checksum. From 121.27.205.1:13223 to 61.178.231.X:13803 ulen 1056
- [32441.155480] UDP: bad checksum. From 121.27.205.1:13223 to 61.178.231.X:13803 ulen 1056
- [32446.515058] UDP: bad checksum. From 116.208.196.109:20220 to 61.178.231.X:11662 ulen 116
- [32581.577348] UDP: bad checksum. From 58.44.246.205:13980 to 61.178.231.X:13876 ulen 1056
- [32682.521452] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32682.662707] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32682.709034] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32685.975322] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32688.112755] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32694.100693] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32697.314187] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32697.357757] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32697.403166] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32697.410709] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32700.153897] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32703.182395] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32707.517785] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32710.203817] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32712.288750] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32715.456915] printk: 1 messages suppressed.
- [32715.456923] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32717.684547] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32723.645794] printk: 4 messages suppressed.
- [32723.645801] UDP: bad checksum. From 58.50.13.216:13564 to 61.178.231.X:13617 ulen 1056
- [32878.711360] UDP: bad checksum. From 114.149.251.142:13343 to 61.178.231.X:13320 ulen 1056
- [33139.195948] UDP: bad checksum. From 117.42.156.183:15000 to 61.178.231.X:15000 ulen 1445
- [33139.253567] UDP: bad checksum. From 117.42.156.183:15000 to 61.178.231.X:15000 ulen 1446
- [33144.802990] UDP: bad checksum. From 117.42.156.183:15000 to 61.178.231.X:15000 ulen 1448
- [33565.451681] UDP: bad checksum. From 113.137.240.225:1863 to 61.178.231.X:9099 ulen 1060
- [33582.986148] UDP: bad checksum. From 113.137.240.225:1863 to 61.178.231.X:9099 ulen 1060
- [33772.105596] UDP: bad checksum. From 114.237.123.7:2447 to 61.178.231.X:1731 ulen 21
- [33892.254780] UDP: bad checksum. From 222.243.35.18:53126 to 61.178.231.X:12403 ulen 132
复制代码
为了防止DDOS攻击,我在/etc/sysctl.conf加入了如下内容。
- net.ipv4.netfilter.ip_conntrack_max = 98000
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_close = 30
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 30
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_last_ack = 120
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_close_wait = 30
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 60
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 30
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv = 30
- net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_sent = 30
- net.ipv4.tcp_keepalive_time = 10
- #
- net.ipv4.tcp_syncookies= 1
- net.ipv4.tcp_fin_timeout=2
- net.ipv4.tcp_tw_reuse = 1
- net.ipv4.tcp_tw_recycle = 1
- net.ipv4.tcp_tw_reuse = 1
- net.ipv4.ip_local_port_range=102465000
- net.ipv4.tcp_max_syn_backlog = 8192
- net.ipv4.tcp_max_tw_buckets = 5000
- net.ipv4.tcp_synack_retries = 2
- net.ipv4.tcp_syn_retries = 2
复制代码
/proc/net/ip_conntrack 的计数如下:
- $ sudo wc -l /proc/net/ip_conntrack
- 13109 /proc/net/ip_conntrack
复制代码
请问各位朋友,出现这种问题,是什么原因?如何应对?服务器有运行IPTABLES。 |
|