Calendar

July 2010
S M T W T F S
« Jun    
 123
45678910
11121314151617
18192021222324
25262728293031

ป้องกัน dictionary attack ssh ด้วย SSHGuard

freeBSD โดยปกติแล้วจะไม่ให้ทำการ ssh ด้วย root เพราะว่าจะทำให้โดน brute force ssh เข้ามาได้โดยง่าย
เพื่อความปลอดภัยแล้วจึงควรลง sshguard เพื่อกันไว้อีกชั้นก็ดี

$cd /usr/ports/security/sshguard-ipfw
$make install

แล้วไปทำการแก้ไฟล์ /etc/syslogd.conf
บรรทัดที่เขียนว่า
#auth.info;authpriv.info |exec /usr/local/sbin/sshguard
ให้นำ # ออกไป

$vi /etc/syslogd.conf

จากนั้นทำการ reload โดยการ

$/etc/rc.d/syslogd reload

โดยระบบจะเก็บ log อยู่ที่ /var/log/auth.log

จากนั้นก็ลอง login แล้วกรอกรหัสผิด 4 ครั้ง ระบบก็จะทำการ block ip เราไปชั่วคราว

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • PDF
  • RSS
  • Twitter
  • Yahoo! Bookmarks
  • email

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">