จากวันนั้นที่เคยบอกไปว่า Serverถูกพยายามแฮก
ตอนนั้นยังโ่ง่อยู่ไม่รู้ว่าโดนอะไร ตอนนี้ฉลาดแล้วแหล่ะ มันคือการ Brute Force port SSH เกิดจากที่เวลาเราเปิด port ssh เพื่อที่จะเข้ามาที่ server ผ่านทาง internet เราอาจเจอคนอื่นที่สแกนพอร์ดของเครื่อง server ของเราและพยายามสุ่ม password ของ root เข้ามา
วิธีแก้ไขด้วย iptables
iptables -I INPUT -i ppp+ -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
iptables -I INPUT -i ppp+ -p tcp --dport 22 -m state --state NEW -m recent --update --name SSH --seconds 60 --hitcount 4 -j DROP
จากตัวอย่างเป็นการตั้งค่า หากมีการเชื่อมต่อ Port 22 มาเกิน 3 ครั้งใน 1 นาที ก็จะทำการ Block IP นั้น เป็นต้น
This web page is included as a technical article, journal, technical, news, games and CV of Pankpond. Pankpond have 5 years experience of Information Technology and Software development worked for the multi-national company (Thai,French,Australia)
วันจันทร์ที่ 12 มกราคม พ.ศ. 2552
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
คลังบทความของบล็อก
เกี่ยวกับฉัน
- pound pound
- Linux user number 528023.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น