• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty

How to block malicious web requests with BusinessPress

  1. Make sure you follow the guide to setup fail2ban for BusinessPress
  2. Edit /etc/fail2ban/action.d/iptables.conf, changing blocktype = REJECT --reject-with icmp-port-unreachable and blocktype = REJECT --reject-with icmp6-port-unreachable to blocktype = DROP. This is necessary to avoid multiple malicious requests to be sent over the already established TCP connection.
  3. Create /etc/fail2ban/filter.d/waf.conf:
# Fail2Ban configuration file
#

[INCLUDES]

# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf


[Definition]

_daemon = (?:wordpress|wp)

# Option:  failregex
# Notes.:  regex to match the password failures messages in the logfile. The
#          host must be matched by a group named "host". The tag "<HOST>" can
#          be used for standard IP/hostname matching and is only an alias for
#          (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values:  TEXT
#
failregex = ^%(__prefix_line)sBusinessPress WAF .* from <HOST>$

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =
  1. Create /etc/fail2ban/jail.d/waf.conf:
[waf]
enabled = true
filter = waf
logpath = /var/log/auth.log
port = http,https
backend = auto

maxretry = 1 ; ban after a single bad try
findtime = 1200
bantime = -1 ; bans the IP forever

ignoreip = 127.0.0.1 {your server IP here}
  1. Run fail2ban-client -d to check configuration, fail2ban-client reload to reload it and fail2ban-client status to verify the new jail is added. You should now see waf in the list:
# fail2ban-client status
Status
|- Number of jail:  4
`- Jail list:   repeated, sshd, waf, wordpress
  1. Use a VPN or some spare server to make a request to URL like https://your-site.com/.env.

  2. Check fail2ban-client status waf to verify that the IP has been banned.

Primary Sidebar

BusinessPress

  1. How to setup login protection
  2. How to block repeated offenders
  3. How to block malicious web requests

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2026 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬