tid=35277&以下參考:
; h0 T2 T- p3 x3 N5 T7 ]% ^8 bhttp://serverfault.com/questions/275669/ssh-sshd-how-do-i-set-max-login-attempts, J4 V+ T" C- J, k" @2 d2 R3 [7 E
http://www.cnblogs.com/taosim/articles/3134394.html
. ~3 F1 Q) t, ` w! ]* x" l
: [* M( }; l" T" A& n3 o$ V1) 在/etc/ssh/sshd_config加入下列一行% y, D* g# W$ H1 G
) l. s- X$ }) M) E( [4 W$ Y+ f2 Z
8 b. O3 H3 z) v3 ]! G2) 在防火牆加入下列規則
+ n3 B' v4 h e, ~! i9 O+ f( a- iptables -N SSHATTACK
; v2 D0 `( D* x. T - iptables -A SSHATTACK -j LOG --log-prefix "Possible SSH attack! " --log-level 7- T* C: z# B. Z- X* w, C! a! Z
- iptables -A SSHATTACK -j DROP
複製代碼 , z( Y) m* q! v- H9 k
# b2 K! E2 v1 b' s' v$ v
3) 在/var/log/syslog 觀察可能的ssh攻擊1 ?. G H# ^5 ?
- Dec 27 18:01:58 ubuntu kernel: [ 510.007570] Possible SSH attack! IN=eth0 OUT= MAC=01:2c:18:47:43:2d:10:c0:31:4d:11:ac:f8:01 SRC=192.168.203.129 DST=192.168.203.128 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=30948 DF PROTO=TCP SPT=53272 DPT=1785 WINDOW=14600 RES=0x00 SYN URGP=0
複製代碼 8 F0 U9 P7 ~# w
* J3 I9 L% |" e, l) U$ S8 l
' s! H1 ~ F3 P9 t) L
( \/ y; A; w: `# S u" Q9 @ |