Wednesday, July 18, 2012

Set ให้ Endian Firewall รายงาน Event notifications

คุณผู้อ่าน... ท่านที่เคารพ

EFW Community มีดีอีกอย่างหนึ่งคือ Event notifications รายงานให้ admin รับทราบเหตุการณ์ผ่าน E-Mail อย่างฉับพลันทันที ของดี ๆ หาก config ไม่ถูกต้องก็อดได้ใช้เหมือนกัน

มาดูวิธีการ config ในแบบฉบับของผมครับ

1. ต้อง enable SMTP Proxy และกำหนดค่า Activate smarthost for delivery เสียก่อน


Proxy -> SMTP
Advanced -> Activate smarthost for delivery
Smarthost address -> smtp.live.com
Smarthost port -> 587
Smarthost authentication : k.tawich@hotmail.com
Smarthost password :xxxxxxx
Choose authentication method : PLAIN,LOGIN

ในที่นี้ผมใช้ hotmail เป็น Smarthost ท่านอื่นแล้วแต่ถนัด มีเคล็ดลับอยู่ว่า "หากใช้ mail ของ ISP ต้องตรวจสอบว่าเขาเปิด port 25 ให้ด้วยไหม"

2. เปิด Event notification

System -> Event notifications
Settings
Email notifications ->
notify using custom email address
Mail sender address -> ชื่อที่ให้ replay กลับได้
Mail recipient address -> Email ที่คุณอยากให้ notify ประจำ
Mail smarthosts -> 127.0.0.1
เท่านี้ก็ OK ใช้งานได้ครับ ดูรูปภาพประกอบ

คอนเซ็ป ให้ firewall รายงานสถานะต่าง ๆ เป็นเรื่องที่ดีไม่ว่าจะเป็น firewall ค่ายไหน สำหรับ EFW ที่ให้มาเป็นค่าตั้งต้นนั้นดูออกจะน้อยไปหน่อย และไม่ค่อยเกิดประโยชน์ เมื่อเหตุการณ์นั้น ๆ เกิดขึ้นแล้ว เพียงรายงานให้ทราบสถานะเท่านั้น

หากต้องการให้ EFW รายงานสถานะของ application ต่าง ๆ เราก็ประยุกต์ใช้เพิ่มเติมได้อีก โดยใช้ mail command ร่วมกับ script ต่าง ๆ ของโปรแกรมนั้น ๆ ได้ เช่นให้รายงาน access.log ของ squid ทุกวัน เราก็สร้าง script ส่งไฟล์ access.log โดยผ่าน Smarthost ได้ นับได้ว่าได้ใช้ EFW อย่างคุ้มประโยชน์ เหมาะต่อ admin ขั้นเทพอย่างเราๆท่านๆ อย่างยิ่ง....

เอวัง


0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More