Skip to main content

5 Rules Paling Penting



🔥 5 Rules Paling Penting

Rule 1 – Block akses ke file sensitif Laravel

  • Expression:

    (http.request.uri.path contains ".env" or http.request.uri.path contains "/vendor" or http.request.uri.path contains "/storage" or http.request.uri.path contains "/config" or http.request.uri.path contains "/.git" or http.request.uri.path contains "composer.json" or http.request.uri.path contains "artisan")
    
  • Action: Block

  • Tujuan: Menutup akses langsung ke file & folder Laravel yang sering jadi target exploit.


Rule 2 – Challenge akses ke halaman login/admin

  • Expression:

    (http.request.uri.path contains "/login" or http.request.uri.path contains "/admin" or http.request.uri.path contains "/dashboard")
    
  • Action: Managed Challenge (atau JS Challenge kalau Managed Challenge tidak muncul di menu)

  • Tujuan: Mencegah brute force login & bot scanning ke halaman admin.


Rule 3 – Block trafik dari luar Indonesia

  • Expression:

    not ip.geoip.country in {"ID"}
    
  • Action: Block

  • Tujuan: Kalau aplikasi hanya untuk user di Indonesia, ini drastis mengurangi serangan luar negeri.


Rule 4 – Challenge user-agent mencurigakan (sqlmap, curl, dll.)

  • Expression:

    (http.user_agent contains "sqlmap" or http.user_agent contains "nikto" or http.user_agent contains "curl" or http.user_agent contains "python-requests")
    
  • Action: Managed Challenge

  • Tujuan: Bot scanner populer langsung ditahan.


Rule 5 – Block akses ke file dengan ekstensi berbahaya

  • Expression:

    http.request.uri.path matches "(?i).*\.(bak|sql|zip|tar|gz|tgz)$"
    
  • Action: Block

  • Tujuan: Mencegah attacker download file backup/database yang mungkin kelupaan di server.


📌 Cara Tambah Rule di Cloudflare Free Plan

  1. Login ke Cloudflare Dashboard.

  2. Pilih domain poltekesos.ac.id.

  3. Masuk ke menu Security → Security Rules.

  4. Klik Create Rule → isi nama rule → paste expression di atas → pilih Action sesuai yang ditulis.

  5. Ulangi sampai ke-5 rules ini dibuat.

  6. Urutan rules tidak masalah di Free Plan (akan dieksekusi semua).


Dengan 5 rules ini, ditambah Super Bot Fight Mode + Security Level High, Laravel 5.7 kamu jauh lebih aman walaupun tidak diupgrade.


 

 

Error: Service usage limit reached. Please wait a while and try again.
Open in Google Translate