Requirements

Joomla! 5.3 Joomla! 5.4 PHP 8.1 PHP 8.2 PHP 8.3 PHP 8.4

Joomla! 6.0 Joomla! 6.1 PHP 8.3 PHP 8.4 PHP 8.5

  • Basic Joomla! knowledge available between the chair and the keyboard :)

Installation is easy!

  1. Download the package
  2. in the Back-end go to menu Extensions > Manage
  3. in the tab [Upload file package] click [browse]  and select your downloaded package
  4. click [Upload & Install], wait for the installation to finish

Basic setup

  1. [not required] Create (hidden) menu item for Override Page: in Menu manager add a new menu item in the menu you want to add it to:
    1. Title: e.g. "Override"
    2. Menu item Type, click [Select] > ochSimpleFirewall > Override
    3. Status: Published
    4. Access: Public
  2. Enable Scheduled Tasks
    1. It is advised to configure the Task Scheduler to be triggered with a 'Web Cron': You set up a CRON job which accesses a special URL on your site every x minutes and tells Joomla to look for any pending tasks and execute them. This method is suitable for hosts which only allow URL-based pseudo-CRON, i.e. accessing a URL periodically.
      1. Go to your site's backend, System, Managed, Scheduled Tasks.
      2. Click on the Options button.
      3. Click on the Web Cron tab.
      4. Set the Web Cron option to Enabled.
      5. Click on the Save button on the toolbar.
      6. When the page reloads click on the Web Cron tab again.
      7. Copy the “Webcron Link (Base)” contents. It's a URL similar to https:/[yourdomain]/component/ajax/?plugin=RunSchedulerWebcron&group=system&format=json&hash=[secretcode].
      8. Create a CRON job to access this URL every x minutes of every hour of every day.
    2. Enable:
      1. ochSimpleFirewall: Refresh Cache > when having ipsets enabled | schedule for once a day
      2. ochSimpleFirewall: Refresh GeoIP > when using GeoIP / Country including / excluding | schedule for once a week
      3. ochSimpleFirewall: Account Protection > when using Account Protection | schedule for once a day
  3. Add you own IP Address to the Allow list:
    1. menu Components > ochSimpleFirewall > Allow/Block > click [new]
    2. Copy your IP Address (listed in the right sidebar) into the 'Address' field
    3. Set 'Address' Type: IP Address
    4. Set 'Action': 'Allow'
    5. Set 'Description': free text...
    6. Click [Save & Close]

Component Configuration

  • In the back-end go to menu Components > ochSimpleFirewall > Action logs.
  • In the component click on the [Options] button
    • Functionality is configured per Tab, click [Toggle Inline Help] for detailed descriptions
  • click [Save & Close] and you are good to go

Activate Joomla! One Click update and change-log integration

When you install the extension, it will automatically integrate with the Joomla Updater for both updates and change-logs.

On first use, the Joomla updater will prompt you with a 'Download Key is missing!' message.

  1. On this site: Go to [Tools > My Account > My Download Keys], and copy your Download ID#.
  2. On your site: Go to System > Update Sites, locate the extension, and paste the Download ID into the 'Download Key' field. Click [Save and Close].

Important:
If you're using this Download ID on a new server, you’ll receive an email to approve the device. Click the link in the email to enable downloads from this server.
Without approval, updates won’t be authorized, and the Joomla updater will display a 401 Unauthorized error when trying to fetch updates.

That’s it! You're all set.

  • DryRun: when enabled you can see in the log file what would have been blocked. This feature enables you to test your configuration without impact for visitors
  • Enable Protection On: Here you can configure to enable protection on the site (front-end), administrator (back-end), or both.
  • Block Mode: configure what to do when a Visitor is blocked:
    • Show nothing (white page) with a 403 (not allowed) header
    • Show a message "Your connection to this website has been blocked by our firewall. [a.b.c.d]" with a 403 (not allowed) header
    • Redirect the offender to an external website: e.g. google.com with a 303 (redirect other) header.
    • Allow Override: prompt the blocked visitor with a form to temporarily whitelist himself (important: working captcha highly recommended / required)
  • Email site administrator: select 'Yes' if you want to be mailed when a blocked visitor does a manual override.
  • Exclude URLs: here you can configure (part of) an URL or multiple comma separated that should never be blocked by the firewall. This enables you to minimize the impact of a false positive.
  • Cache Lifetime (Hours): set to the configured scheduled task 'ochSimpleFirewall: Refresh cache' schedule + 1 hour. e.g. set to 25 when scheduled task is run daily

The offending IP Addresses are gathered, maintained and sourced by FireHOL a firewall for humans!

In this component we have a subset of these hundreds of sets that combine multiple sets. Each set serves a specific category of traffic:

Attackers

  • firehol_level1: "This IP list is a composition of other IP lists.
    The objective is to create a blacklist that can be safe enough to be used on all systems, with a firewall, to block access entirely, from and to its listed IPs.
    The key prerequisite for this cause, is to have no false positives. All IPs listed should be bad and should be blocked, without exceptions."
  • firehol_level2: "An ipset made from blocklists that track attacks, during about the last 48 hours. (includes: blocklist_de dshield_1d greensnow)"
  • firehol_level3: "An ipset made from blocklists that track attacks, spyware, viruses. It includes IPs than have been reported or detected in the last 30 days. (includes: bruteforceblocker ciarmy dshield_30d dshield_top_1000 malc0de maxmind_proxy_fraud myip shunlist snort_ipfilter sslbl_aggressive talosintel_ipfilter zeus vxvault)"
  • firehol_level4: "An ipset made from blocklists that track attacks, but may include a large number of false positives. (includes: blocklist_net_ua botscout_30d cruzit_web_attacks cybercrime haley_ssh iblocklist_hijacked iblocklist_spyware iblocklist_webexploit ipblacklistcloud_top iw_wormlist malwaredomainlist)"
  • firehol_webserver: "A web server IP blacklist made from blocklists that track IPs that should never be used by your web users. (This list includes IPs that are servers hosting malware, bots, etc or users having a long criminal history. This list is to be used on top of firehol_level1, firehol_level2, firehol_level3 and possibly firehol_proxies or firehol_anonymous) . (includes: maxmind_proxy_fraud myip pushing_inertia_blocklist stopforumspam_toxic)"

Malware

  • firehol_webclient: "An IP blacklist made from blocklists that track IPs that a web client should never talk to. This list is to be used on top of firehol_level1. (includes: ransomware_online sslbl_aggressive cybercrime dyndns_ponmocup maxmind_proxy_fraud)"

Spam

  • firehol_abusers_30d: "An ipset made from blocklists that track abusers in the last 30 days. (includes: cleantalk_new_30d cleantalk_updated_30d php_commenters_30d php_dictionary_30d php_harvesters_30d php_spammers_30d stopforumspam sblam)"
  • cleantalk_30d: "Today's HTTP Spammers (includes: cleantalk_new_30d cleantalk_updated_30d)"
  • botscout_30d: "BotScout helps prevent automated web scripts, known as bots, from registering on forums, polluting databases, spreading spam, and abusing forms on web sites. They do this by tracking the names, IPs, and email addresses that bots use and logging them as unique signatures for future reference. They also provide a simple yet powerful API that you can use to test forms when they're submitted on your site. This list is composed of the most recently-caught bots."
  • stopforumspam: "StopForumSpam.com Banned IPs used by forum spammers"

Cloud Service IP Sets

  • Amazon Web Services: A complete list of AWS web servers. Use this when you only want real visitors and not (malicious) web applications
  • Google User Content (Web Services): A complete list of Google User Content web servers: Use this when you only want real visitors and not (malicious) web applications

read the Tips and Tricks for advice and what to configure and how to monitor!

Read more on this feature in this blog: Use Case: Actively inspect your website traffic and block hackers

  • Select the enabled Active Scanner rulesets:
    • Request URI Rule Sets
    • Query String Rule Sets
    • User Agent Rule Sets
    • User Agent Crawler Rule Sets
    • User Agent AI Bot Rule Sets
  • Specify the disabled Rule Sets ID: you can find these in the ochSimpleFirewall log file, e.g. RU-0015.
  • Collect Abusers: Select 'Yes' to add Abusers that are NOT on another ipset to collected_blocklist or 'Always' to always add Abusers to collected_blocklist. By doing this, they will be blocked for further and future access to your site.

The collected_blocklist IP Addresses can be managed via menu Component > ochSimpleFirewall > Allow/Block

ochSimpleFirewall comes out of the box with the at time of release latest set of MaxMind GeoIP netsets. With these GeoIP NetSets you can select which countries to block (or allow) via ochSimpleFirewall.

MaxMind GeoIP netsets can be periodically updated to the latest version, this can be done manually or automatically via scheduled task 'ochSimpleFirewall: Refresh GeoIP'. In order to be able to download new GeoIP netsets, you need a free MaxMind account and a free MaxMind license key.

  1. Create a free MaxMind Account: https://www.maxmind.com/en/geolite2/signup
  2. Login in with your new account
  3. go to the left navigation menu > Services > Click on 'My License Key' and then click on [Generate new license key]
  4. Enter your description for the license key, select Yes on 'Will this key be used for GeoIP Update?'
  5. Select the 'Generate a license key and config file for use with geoipupdate version 3.1.1 or newer.' and click the [Confirm] button.
  6. In ochSimpleFirewall configuration enable GeopIP NetSets in tab GeoIP NetSets
  7. Copy the generated License key into ochSimpleFirewall tab GeoIPNetSets tab, field 'MaxMind License key'

ochSimpleFirewall can now download and process the updated GeoIP netsets. Once downloaded and processed you can select which countries to block via ochSimpleFirewall.

  1. Make sure ochSimpleFirewall is enabled and running: this is important as this is required for downloading and processing.
  2. in Tab GeoIP Netsets, configure setting 'Enable GeoIP NetSets' to enable, several options will show
  3. Block or Allow will either block the selected countries and allow all others, or allow the selected countries and block all others
  4. set setting 'Download GeoIP NetSets' to 'Yes' and click [Save] to start the download and conversion of the GeoIP Netsets (This can take some time, please wait until you get a success or fail message)
    When download is successful, setting 'Download GeoIP NetSets' is automatically switched back to 'No', this to avoid subsequent downloads when saving the plugin.
  5. When downloading succeeded, the drop down list 'Block Countries' is filled with all the countries, select one or multiple that you want to block.
  6. Mail Cron Result: sent mail on completion to site administrator> No, only on error, always

When enabling Administrator Area Protection, the username(s) and password(s) you specified here will be requested by your browser before your regular Joomla! Administrator login is displayed. Administrator Protection works at server level, using a .htaccess file in your site's administrator folder. Your server must support directory password protection with .htaccess files for this protection to have any effect.

Because this is a Server Level protection, it protects your Administrator area even if you disable or uninstall ochSimpleFirewall.
If for any reason your administrator area becomes inaccessible, or you need to remove the password protection. Without having access to this plugin, you will need to delete the .htaccess and .htpasswd files from the administrator directory of your site using FTP or your host's File Manager.

  • Enable Administrator Protection: Enable or disable Administrator protection
  • Reset Custom Error Pages: Restores Apache's custom error pages for HTTP 401 and 403 to their default configurations. This action avoids encountering a 404 Article Not Found error when attempting to access the administrator login page after activating the Administrator Password Protection feature. It's highly recommended to maintain this option enabled, unless it triggers an HTTP 500 Internal Server Error issue.
  • Authentication prompt: configure the text that will be used in the authentication prompt
  • Allow from IP: You can configure IP exceptions, when met these users will NOT be prompted for a username / password
  • Credentials: create one or more username / password credentials

When clicking [Save]  you will directly be prompted with the (new) authentication prompt: You must login with your created credentials to complete the saving of the plugin setting. When login is successful, your browser session will be authenticated. Only when you close your browser and start a new session you will be prompted to login again.

When enabling User notifications, you users will get notified of crucial account activities so they can take appropriate action.

You can enable the following setting:

  • Only Site Administrator(s): for testing / stealth reporting, only site administrator(s) will get the notification, not the users
  • BCC Site Administrator(s: when email users, send BCC to site administrator(s)
  • Password Change: email on password change (via front-end only)
  • Email Change: email on email change (front-end only). Mail is send to the last known email account
  • New Device / Location login: email on login (both front-end and back-end) on new device (based on hashed IP address)
    • Send on First Login: send email on first login, or only on new devices after first login
    • Expire Known Device: the number of days to mark a device as known, set to 0 to disable expiring of the device.
  • Protect Account Login: prevent maximum simultaneous logins with one account
  • Protect User Accounts: expire (block or require password reset for) user accounts not used within configured number of days
    • User Account Protection is enforced via a Scheduled Task (ochSimpleFirewall: Account Protection).
      The advised task frequency is once per day.

Site Copy protection loads a small JS script on your site that checks the domain name in the URL of your pages. When your site gets copied, this script will notice that the domain name is different and will automatically redirect the visitor of the copied site to your homepage.

  • Enable Site Copy Protection: Yes / No
  • Redirect Visitor: Redirect the visitor on the Copied Site to your home page. Note: this setting is copied together with the complete copied page so it needs to be set before the site gets copied.
  • Report to Logfile: The visited (copied) URL will be reported in the logfile. Note that 'Redirect Visitor' needs to be turned on for this feature.

Action Logs logs all blocked and whitelisted IP addresses. This data is used for creating the graphs.

  • Retension Days: Configure the number of days to keep in the Action Logs. Older entries will be removed automatically.
  • Fail2Ban Log: Fail2Ban is an intrusion prevention software framework. Fail2ban operates by monitoring configured log files for selected IP Addresses and block them using your server's firewall rules. When enabled, all blocked IP Addresses will be logged to ochsimplefirewall-fail2ban log. You need to configure fail2ban with a JAIL and FILTER to automatically block all IP Addresses in that logfile.
  • Debug: Errors are always logged to your logs directory in plg_system_ochsimplefirewall-log.php. When enabling debug also info and warnings are logged showing you for example which IP addresses are blocked and by what ip set, what URL they where trying to visit, if the cache is created correct, who is accessing your site and is whitelisted, etc. Use this to get a good understanding of what IP Sets are best (or unused) for your site profile.
  • Enable POST data logging: select:
    • No (turned off)
    • Yes, log only POST data without valid CSRF Token
    • Yes, log all POST data
  • Exclude WhiteListed: Select Yes to exclude POST data logging from whitelisted IP addresses.
  • Administrators Email(s): Configure the Administrators Email(s), comma separated or each email on a new line. Leave empty to use Emails from User Accounts which have enabled 'Receive System Emails'.

ochSimpleFirewall version 3 (and lower) was implemented as a system plugin only.

When installing ochSimpleFirewall package version 4.0 and higher on a system that has the old plugin installed the following actions are executed:

Automatic:

  • ochSimpleFirewall plugin settings are imported into the new component options
    • A backup of all the settings in ochSimpleFirewall plugin are copied in file: [site root]/tmp/plugin-ochsimplefirewall-params-[epoch timestamp].json
  • The IP addresses in collected_blacklist.ipset are imported as blocked IP addresses
    • A backup is made of the collected_blacklist in file: [site root]/tmp/plg_system_ochsimplefirewall_collected_blacklist.ipset
  • Whitelisted IP Addresses in ochSimpleFirewall plugin are imported as allowed IP Addresses
  • Whitelisted Hostnames in ochSimpleFirewall plugin are imported as allowed Hostname addresses

Manual / validate:

  • Validate component options: : menu Component > ochSimpleFirewall > click [options], are the settings correct?
  • Validate whitelisted IP Addresses and host names: menu Component > ochSimpleFirewall > Allow/Block > filter on 'Allow'
  • Account protection emails where implemented in ochSimpleFirewall via language strings, these are now implemented via Joomla Mail templates: when you made changes via language overrides, check if these emails are still correct: menu System > Templates > Mail Templates
  • Create a (hidden) menu item for the Override page, check if this page is displaying correct using the test parameter: [your domain]/?ochsfw=test-override
    • is the page displaying correct
    • is the captcha displaying (not when invisible)
    • is the page URL correct pointing to the menu item you created for it.
  • Remove / disable the cron jobs you had running for the ochSimpleFirewall plugin (refresh-cache, download-geoip and protect-users)
    • configure Joomla Scheduled Tasks execution, preferably via Web Cron: menu System > Manage > Scheduled Tasks > click [options]
    • enable and set the execution schedule of the 'ochSimpleFirewall: ...' Scheduled Tasks 

Agency Bundle - 12 months

Supercharge your Joomla! toolbox with the Agency Bundle! Get all extensions plus 2 Hours of expert support – Subscribe today!
More Information

ochSimpleFirewall - 12 months

Complete Joomla security suite: automatically block hackers, AI scrapers, and malicious bots, with real-time reporting and automated maintenance built in.
More Information

Tips & Tricks

  • Always add your own IP address to the whitelist.
  • Start with the following IP Sets enabled:
    • Attacks: firehol_level1 + firehol_webserver
    • Malware: firehol_webclient
    • Spam: cleantalk_30d, botscout_30d
  • StopForumSpam IP set is a very large (in size) set because it holds little ranges and many addresses. The hit level on our own sites are very low.
  • Always start with debug setting on. Monitor the log file for a couple of days to get a good understanding of the time needed to create the cache files (so you can configure a good Cache lifetime value) and to get insight in what IP set is used (the most) or not used at all. the IP Sets that are not used, can be disabled in the configuration as they then only add to the overhead.
  • Monitor all Blocked IP Addresses. The hostname for these IP addressed is logged as well (when able to resolve). Check if you are not blocking legitimate traffic. E.g. the IP address(es) for googlebot.com are sometimes in an IP set and in that case will be blocked resulting in your site not being crawled by the Google search engine crawler. You can add these 'false positives' to the Allow list or better yet (as Google sometimes changes IP ranges) to the Allow list Hostnames configuration field.
  • Note that the session is checked against the enabled IP sets. That means that for every visitor only the entry page to your site is checked, the result is stored in the session keeping the load on your server to an absolute minimum.
  • Active Scanner, disabled rules:
    • QS-0030 > this will block when selecting an articles via a modal in the administrator area
  • End User Emails can be changed via System > Templates > Mail Templates > 'ochSimpleFirewal: ...'

Technical support and feature requests via our forum (You need a valid subscription to be able to post)