- 论坛徽章:
- 0
|
真的不知道该发哪个版块,如果发错了,希望版主帮忙移一下,别直接删除,发贴也很辛苦,谢谢!
我公司使用的Linux服务器,Ubuntu 12.04 LTS ,主要是提供手机WAP站点的。这几天看系统日志,发现有大量的类似以下内容。- Sep 17 15:42:23 ttpodserver-yd10 kernel: [16769088.050047] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:43:41 server-yd10 kernel: [16769166.091587] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:44:53 server-yd10 kernel: [16769237.818491] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:48:14 server-yd10 kernel: [16769438.292006] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:49:23 server-yd10 kernel: [16769507.697185] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:51:08 server-yd10 kernel: [16769611.756207] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:52:14 server-yd10 kernel: [16769677.905538] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:53:15 server-yd10 kernel: [16769738.454028] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:54:25 server-yd10 kernel: [16769808.674894] possible SYN flooding on port 80. Sending cookies.
- Sep 17 15:55:45 server-yd10 kernel: [16769888.476346] possible SYN flooding on port 80. Sending cookies.
复制代码 刚开始以为是连接数多,然后就调了一下内核参数,具体如下- net.ipv4.tcp_max_syn_backlog = 10000000
- net.ipv4.tcp_synack_retries = 3
- net.ipv4.tcp_abort_on_overflow = 1
- net.ipv4.tcp_fin_timeout = 10
- net.ipv4.tcp_syncookies = 1
- net.ipv4.tcp_tw_reuse = 1
- net.ipv4.tcp_tw_recycle = 1
- net.ipv4.tcp_keepalive_time = 1200
- net.ipv4.ip_local_port_range = 10240 62000
复制代码 tcp_max_backlog我都调到1000W了,还是报这个,头疼了。然后看了一下连接数- server@host-00020:~$ sudo netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
- LAST_ACK 279
- SYN_RECV 217
- ESTABLISHED 616
- FIN_WAIT1 665
- FIN_WAIT2 28
- CLOSING 97
- TIME_WAIT 7451
复制代码 发现连接数很少。
然后又看了一下IP连接情况
ttpod@tts-00020:~$ sudo netstat -n | awk '/^tcp/ {print $5}'| awk -F: '{print $1}' | sort | uniq -c | sort -rn- 736 127.0.0.1
- 116 125.88.122.103
- 89 218.202.226.57
- 69 115.168.76.178
- 51 60.213.8.54
- 44 115.168.77.68
- 34 112.96.30.30
- 32 117.136.0.233
- 31 61.191.40.75
- 31 115.168.51.143
- 30 58.210.82.194
- 30 117.136.37.31
- 30 117.136.37.133
- 30 116.113.84.223
- 29 117.36.73.99
- 29 117.136.22.53
- 28 218.242.202.196
- 28 117.136.16.211
- 27 116.59.226.235
- 26 117.136.0.100
- 25 58.38.53.127
- 25 211.138.237.203
- 25 123.122.112.178
- 25 112.96.160.157
- 24 125.86.7.114
- 24 123.88.57.36
- 24 113.5.0.61
- 23 222.94.103.19
- 23 222.49.172.120
复制代码 127的是我自己的代理,可以忽略,但是这些个IP,连接数都很多。想问的是,手机上网的话是怎样的一种形式。每个手机的IP都是独立的吗?还是说会有一些手机的IP是一样的。或者是手机是通过NAT上网的???求解。 |
|