1 answer
For admin protection, I recommend a comprehensive approach:
1. Fail2ban for IP blocking
# /etc/fail2ban/jail.local
[opencart-admin]
enabled = true
filter = opencart-admin
logpath = /var/www/html/storage/logs/error.log
maxretry = 5
bantime = 3600
2. Two-Factor Authentication
Install Google Authenticator module from marketplace.
3. Captcha
// In login controller
if (!$this->captcha->verify()) {
$this->error['captcha'] = 'Invalid captcha';
}
4. Additionally:
- Restrict access by IP via .htaccess
- Change admin path
- Use HTTPS
Your Answer
Login to answer this question
Login