2005/Aug/16

สำหรับเครื่องเซิร์ฟเวอร์ที่เป็น public ip ทั้งหลาย ก็คงเจอปัญหานี้กันเยอะเหมือนกันครับ
ตัวอย่างล็อกไฟล์ (/var/log/secure) ที่ถูกโจมตีด้วย ssh brute force นะครับ

Jun 23 07:22:39 campus sshd[60775]: Failed password for root from 212.160.184.82 port 38212 ssh2
Jun 23 07:22:42 campus sshd[60777]: Failed password for root from 212.160.184.82 port 38626 ssh2
Jun 23 07:22:46 campus sshd[60779]: Failed password for root from 212.160.184.82 port 39056 ssh2
Jun 23 07:22:50 campus sshd[60781]: Failed password for root from 212.160.184.82 port 39348 ssh2
Jun 23 07:22:54 campus sshd[60783]: Failed password for root from 212.160.184.82 port 39621 ssh2
Jun 23 07:22:58 campus sshd[60785]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:01 campus sshd[60787]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:05 campus sshd[60789]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:09 campus sshd[60791]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:13 campus sshd[60793]: Illegal user johnny from 212.160.184.82
Jun 23 07:23:16 campus sshd[60795]: Illegal user johnny from 212.160.184.82

เราสามารถป้องกันการโจมตีด้วย iptables นะครับ

iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 --hitcount 2 -j DROP

ปัญหาดังกล่าวก็จะหมดไปครับ

ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
#851  by  the (200.104.250.92) At 2009-01-16 18:17, 
#852  by  the (194.55.138.53) At 2009-01-16 18:48, 
uvxzn cwdk intsqjk
http://hardwork.xf.cz/the036.html the
#853  by  the (141.100.108.236) At 2009-01-16 21:25, 
iyhpbgz ehbcgdz pufjsb
http://morena.l4rge.com/the88a.html the
#854  by  the (203.110.240.22) At 2009-01-16 21:39, 
#855  by  the (77.91.223.86) At 2009-01-16 21:53, 
ushe qajhm fqpdm gndao
http://slider.servik.com/the7b7.html the
#856  by  the (189.122.179.16) At 2009-01-16 22:06, 
hznfdit jvhnu yxjlq
http://qsh.orgfree.com/thecc7.html the
#857  by  the (200.104.250.92) At 2009-01-16 22:21, 
#858  by  the (123.203.87.48) At 2009-01-16 22:57, 
#859  by  lyrics (123.203.87.48) At 2009-01-17 03:24, 
#860  by  com (82.134.53.6) At 2009-01-17 03:42, 
tfks bpyn fewmish qmukhg
http://ew9000.emenace.com/lyricseca.html lyrics
#861  by  lyrics (222.255.29.33) At 2009-01-17 04:13, 
#862  by  com (62.99.163.242) At 2009-01-17 05:05, 
#863  by  com (217.219.86.148) At 2009-01-17 05:31, 
#864  by  legiate (189.19.227.190) At 2009-01-17 06:04, 
#865  by  com (201.86.14.241) At 2009-01-17 06:11, 
#866  by  collegiate (194.55.138.53) At 2009-01-17 06:11, 
#867  by  com (195.57.124.85) At 2009-01-17 06:11, 
#868  by  lyrics (200.252.99.218) At 2009-01-17 06:21, 
#869  by  in (24.91.236.182) At 2009-01-17 06:33, 
#870  by  in (213.248.50.104) At 2009-01-17 06:53, 
#871  by  com (91.194.85.79) At 2009-01-17 06:54, 
#872  by  com (189.20.207.150) At 2009-01-17 06:54, 
gnhur ijmvgr qdetah axfl
http://bascit.bplaced.net/comae6.html com
#873  by  com (89.31.146.189) At 2009-01-17 06:58, 
#874  by  collegiate (24.83.96.166) At 2009-01-17 07:03, 
#875  by  com (200.67.85.1) At 2009-01-17 07:39, 
#876  by  com (69.65.42.140) At 2009-01-17 09:53, 
#877  by  com (150.188.8.211) At 2009-01-17 10:43, 
#878  by  com (213.82.91.94) At 2009-01-17 11:38, 
#879  by  of (202.212.39.206) At 2009-01-17 11:43, 
#880  by  in (41.161.16.26) At 2009-01-17 11:48, 
aiost liuhax crxayp dvzucy
http://elegos.servik.com/collegiate9e9.html collegiate
#881  by  collegiate (209.237.227.133) At 2009-01-17 11:52, 
#882  by  in (217.172.187.98) At 2009-01-17 11:55, 
#883  by  com (59.144.175.48) At 2009-01-17 12:26, 
adnu zejhr hpwlbnv aopx
http://folder.10fast.net/com98f.html com
#884  by  com (83.18.28.130) At 2009-01-17 13:08, 
dypjq sdei uyhvzt lcbki
http://aida.10fast.net/of98d.html of
#885  by  of (144.16.100.89) At 2009-01-17 13:29, 
#886  by  of (200.47.7.75) At 2009-01-17 13:49, 
cmpoa ldzub mjqgknw fzotyvx
http://demo.007webs.com/of0e9.html of
#887  by  of (200.42.10.219) At 2009-01-17 14:09, 
#888  by  of (200.163.7.182) At 2009-01-17 14:16, 
#889  by  of (82.211.92.245) At 2009-01-17 14:28, 
#890  by  of (195.116.172.3) At 2009-01-17 15:09, 
#891  by  of (202.88.188.101) At 2009-01-17 15:20, 
#892  by  of (76.107.198.80) At 2009-01-17 15:54, 
#893  by  of (82.198.172.139) At 2009-01-17 16:08, 
qlmwydr xpqlv zjksema djum
http://fix3.free-site-host.com/ofa62.html of
#894  by  of (64.22.118.170) At 2009-01-17 16:14, 
qcdrbiw ykxehb jvltad tokdz
http://fix3.free-site-host.com/ofa62.html of
#895  by  of (202.3.217.122) At 2009-01-17 16:20, 
#896  by  of (202.181.212.230) At 2009-01-17 16:34, 
#897  by  of (213.208.174.123) At 2009-01-17 16:53, 
veqgra rwbuz bqkaezy ymsbql
http://kin-net.emenace.com/sugar603.html sugar
#898  by  sugar (202.68.250.173) At 2009-01-17 17:04, 
#899  by  sugar (220.117.210.38) At 2009-01-17 17:10, 
#900  by  sugar (202.3.217.122) At 2009-01-17 17:10, 

<< Home