{"id":189843,"date":"2020-07-23T20:48:05","date_gmt":"2020-07-23T20:48:05","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=189843"},"modified":"2024-03-28T05:27:27","modified_gmt":"2024-03-28T05:27:27","slug":"defender-ip-address-lockout-firewall","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/defender-ip-address-lockout-firewall\/","title":{"rendered":"How to Create a Powerful and Secure Customized Firewall with Defender"},"content":{"rendered":"<p>WPMU DEV\u2019s 5-star security plugin, <a href=\"https:\/\/wordpress.org\/plugins\/defender-security\/\" rel=\"noopener\" target=\"_blank\">Defender<\/a>, lets you easily set up a firewall, block IP addresses with custom blocklists and allowlists, and more&#8230;leaving unwelcome visitors unable to step even near your WordPress site.<\/p>\n<p>Hackers can be persistent at trying to get into your site and drop malicious code, figuring out your credentials, and leaving spam.\u00a0This tutorial will show you just how easy it is to set up Defender\u2019s IP banning and keep your WordPress site safe and protected.<\/p>\n<figure id=\"attachment_221658\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221658 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/defender-firewall-dashboard.png\" alt=\"Defender firewall dashboard.\" width=\"1288\" height=\"436\" \/><figcaption class=\"wp-caption-text\">Ban IP addresses and lock out hackers from your WordPress site with Defender.<\/figcaption><\/figure>\n<p>Here are the areas we\u2019ll be covering (jump to a specific topic by clicking on it):<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"#bad-ip\">Automatically Identify Bad Acting IP Addresses<\/a><\/li>\n<li><a href=\"#custom\">Creating a Custom Blocklist &amp; Allowlist<\/a><\/li>\n<li><a href=\"#active\">Active Lockout Displays<\/a><\/li>\n<li><a href=\"#IP\">Unlocking IP Addresses<\/a><\/li>\n<li><a href=\"#location\">Location Banning<\/a><\/li>\n<li><a href=\"#message\">Creating Custom Message for Banned Users<\/a><\/li>\n<li><a href=\"#import\">Importing and Exporting Custom Blocklist &amp; Allowlist<\/a><\/li>\n<li><a href=\"#logs\">Check Your Lockout Log for Suspicious Activity<\/a><\/li>\n<li><a href=\"#unlock-me\">Locked Yourself Out? Here&#8217;s How To Get Back In<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>Most areas of this tutorial are accessible in Defender under the <strong>Firewall <\/strong>and <strong>IP Banning<\/strong> section unless specified differently.<\/p>\n<p>Let\u2019s get started with the best and most powerful feature of Defender\u2019s firewall&#8230;<\/p>\n<h3>1. <a name=\"bad-ip\" target=\"_blank\"><\/a>Automatically Identify Bad Acting IP Addresses<\/h3>\n<p>Defender automatically identifies bad acting IP addresses and adds them to a firewall, providing your site with ongoing security and protection.<\/p>\n<p>You can lock out users who attempt a number of failed login attempts. Defender gives you control over the threshold and duration of the lockout in the Login Protection screen (<em>Defender &gt; Firewall &gt; Login Protection<\/em>).<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221635\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221635 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/login-protection-1.png\" alt=\"Defender Login Protection screen.\" width=\"954\" height=\"748\" \/><figcaption class=\"wp-caption-text\">Defender lets you set how many failed login attempts will trigger a lockout for a user&#8217;s IP address.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<p>You can view how many IP addresses have been temporarily blocked in the Active Lockouts section of the IP Banning screen (<em>Defender &gt; Firewall &gt; IP Banning &gt; Active Lockouts<\/em>). You can also unblock IP addresses here.<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221636\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221636 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/active-lockouts-2.png\" alt=\"Defender Active Lockouts section.\" width=\"999\" height=\"229\" \/><figcaption class=\"wp-caption-text\">View and release temporarily blocked IP addresses in the Active Lockouts section.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<p>You can also enable 404 detection (<em>Defender &gt; Firewall &gt; 404 Detection<\/em>), and Defender will automatically block IP addresses that repeatedly request pages on your website that don&#8217;t exist. It will also temporarily block these offending IP addresses from accessing your site.<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221637\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221637 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/404-lockouts.png\" alt=\"Defender - 404 Detection screen\" width=\"936\" height=\"749\" \/><figcaption class=\"wp-caption-text\">Defender&#8217;s 404 detection blocks IP addresses that repeatedly request pages on your site that don&#8217;t exist.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<p><em>Tip:<\/em> You can use the 404 detection feature in combination with Defender&#8217;s <a href=\"https:\/\/wpmudev.com\/blog\/stop-hackers-with-defender-wordpress-security-plugin\/\" target=\"_blank\" rel=\"noopener\">login masking feature<\/a> to immediately identify and block IP addresses requesting your site&#8217;s login page.<\/p>\n<p>In addition to Defender&#8217;s automatic IP blocking features, you can also block IPs manually, as the next section explains.<\/p>\n<h3>2. <a name=\"custom\" target=\"_blank\"><\/a>Creating a Custom Blocklist &amp; Allowlist<\/h3>\n<p>Creating a custom blocklist &amp; allowlist with Defender will keep unwanted IPs from accessing your site, including IP addresses for admins.<\/p>\n<p>You can do this easily by entering IP addresses in the <em>Defender &gt; IP Banning &gt; IP Addresses<\/em> section.<\/p>\n<p><a href=\"https:\/\/wpmudev.com\/blog\/ipv4-vs-ipv6\/\" target=\"_blank\" rel=\"noopener\">IPv4 and IPv6<\/a> are both supported for the blocklist and allowlist.<\/p>\n<p>To ban IPs from accessing your site, select the first tab: <strong>Blocklist<\/strong>.<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221639\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221639 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/blocklist-1.png\" alt=\"Defender IP Addresses - Blocklist section\" width=\"945\" height=\"711\" \/><figcaption class=\"wp-caption-text\">Enter IP addresses you&#8217;d like to permanently ban from accessing your site in the Blocklisted IPs text area.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<p>Type in (or copy and paste) any IPs you want to block&#8211;one IP address per line. These IP addresses will no longer be able to access your site.<\/p>\n<p>Select the next tab to add IP addresses that you want to always have access to your WordPress site to your <strong>Allowlist<\/strong>.<\/p>\n<p>Note that Defender recommends adding your own IP to the Allowlist section to prevent being accidentally locked out of your site and even detects and presents your IP address for you.<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221640\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221640 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/allowlist-01.png\" alt=\"Defender - IP Addresses - Allowlist.\" width=\"948\" height=\"708\" \/><figcaption class=\"wp-caption-text\">Defender recommends adding your own IP to the Allowlist section to prevent yourself from being accidentally locked out.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<p>After adding IP addresses to the blocklist and\/or allowlist, click the <strong>Save Changes<\/strong> button to update your settings.<\/p>\n<h3>3. <a name=\"active\" target=\"_blank\"><\/a>Active Lockout Displays<\/h3>\n<p>The Active Lockouts section (<em>Defender &gt; IP Banning &gt; Active Lockouts<\/em>) lets you easily view how many IP addresses are blocked from accessing your site based on the rules you have set.<\/p>\n<figure id=\"attachment_221642\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221642 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/active-lockouts-3.png\" alt=\"Defender Active Lockouts section.\" width=\"999\" height=\"229\" \/><figcaption class=\"wp-caption-text\">Defender lets you see how many IP addresses have been blocked.<\/figcaption><\/figure>\n<p>And if you need to unblock any IPs, there\u2019s&#8230;<\/p>\n<h3>4. <a name=\"IP\" target=\"_blank\"><\/a>Unlocking IP Addresses<\/h3>\n<p>If you need to unblock a blocked or banned IP address for any reasons, just click the the <strong>Unlock IPS <\/strong>button in\u00a0the <strong>Active Lockouts<\/strong> section.<\/p>\n<figure id=\"attachment_221643\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-221643\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/unlock-ips.png\" alt=\"Defender - Active Lockouts - Unlock IPs button highlighted.\" width=\"999\" height=\"229\" \/><figcaption class=\"wp-caption-text\">Click the button to unlock blocked or banned IP addresses.<\/figcaption><\/figure>\n<p>This will display all blocked IP addresses and allow you to unblock those you select by clicking the <strong>Unblock<\/strong>\u00a0icon.<\/p>\n<figure id=\"attachment_221644\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-221644\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/temporary-ip-blocklist.png\" alt=\"Defender - Temporary IP Block List\" width=\"728\" height=\"815\" \/><figcaption class=\"wp-caption-text\">Unblock IP addresses by clicking on the padlock icon.<\/figcaption><\/figure>\n<p>The IP will be automatically unblocked. There\u2019s no need to click any additional buttons or save anything further after this.<\/p>\n<p>You can also search for specific IP addresses in the search area if you\u2019re having difficulty locating them on the list, and unblock all IPs with the click of a button.<\/p>\n<figure id=\"attachment_221645\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-221645\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/unblock-all-ips.png\" alt=\"Defender - Unblock All IPs\" width=\"700\" height=\"553\" \/><figcaption class=\"wp-caption-text\">You can also search IP addresses and unblock all IPs with the click of a button.<\/figcaption><\/figure>\n<h3>5. <a name=\"location\" target=\"_blank\"><\/a>Location Banning<\/h3>\n<p>In addition to blocking specific IP addresses, Defender also lets you ban entire countries from accessing your site.<\/p>\n<p>This feature is handy when you don\u2019t want or expect traffic from specific locations, and want to stop hackers and bots visiting from certain countries.<\/p>\n<p>All this can be done in the <strong>Locations<\/strong> section (<em>Defender &gt; IP Banning &gt; Locations<\/em>).<\/p>\n<p>Defender uses the GeoLite2 Database from <a href=\"https:\/\/www.maxmind.com\/en\/home\" rel=\"noopener\" target=\"_blank\">MaxMind<\/a> for this feature. You will need to set up a free account to use location banning.<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221647\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221647 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/locations.png\" alt=\"Defender - Locations section.\" width=\"947\" height=\"560\" \/><figcaption class=\"wp-caption-text\">Follow the steps to set up an account with MaxMind and ban countries you don&#8217;t want accessing your site.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<p>Follow the prompts and click on the links provided to set up your free account. You will receive an email with instructions on how to set up a password.<\/p>\n<p>After logging in, click the link for a new license key in Defender\u2019s dashboard, create a new license key in MaxMind and copy and paste this key into the <strong>License Key<\/strong> field in Defender&#8217;s Locations section.<\/p>\n<figure id=\"attachment_189850\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-189850\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/user-id-and-license-key.png\" alt=\"Where a new key is produced.\" width=\"600\" height=\"265\" \/><figcaption class=\"wp-caption-text\">Where a new key is produced.<\/figcaption><\/figure>\n<p>After pasting in your new license key, hit the <strong>Download<\/strong> button to enable the option to <strong>Blocklist <\/strong>and <strong>Allowlist<\/strong> any country.<\/p>\n<p>Note: Allow a few minutes for the key to register.<\/p>\n<p>Once the key has registered and feature has been activated, you&#8217;ll see a drop-down menu displaying a list of countries as you start typing.<\/p>\n<p>Select the countries you want to blocklist from this dropdown menu and repeat this process for any countries you want to allowlist.<\/p>\n<figure id=\"attachment_189851\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-189851 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/locations-allowlist-and-blocklist.png\" alt=\"Defender - Locations - Drop-down menu of countries for blocklisting.\" width=\"600\" height=\"407\" \/><figcaption class=\"wp-caption-text\">Select the countries you\u2019d like to blocklist or allowlist from the dropdown menu.<\/figcaption><\/figure>\n<p>Selected countries will appear in the box below the blocklist and allowlist areas. To remove any countries from your list, click on the \u2018X\u2019 next to the country\u2019s name.<\/p>\n<figure id=\"attachment_189852\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-189852\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/blocklisted-countries.png\" alt=\"Blocklist of countries.\" width=\"600\" height=\"221\" \/><figcaption class=\"wp-caption-text\">List of the countries added so far.<\/figcaption><\/figure>\n<p>If you make any changes in this section, remember to update your settings by clicking the<strong> Save Changes<\/strong> button.<\/p>\n<h3>6. <a name=\"message\" target=\"_blank\"><\/a>Creating Custom Messages for Banned Users<\/h3>\n<p>Defender lets you customize the message that will display to locked out users.<\/p>\n<p>If you want to display a message other than the default that Defender automatically provides, just scroll down to the <strong>Message<\/strong> section (<em>Defender &gt; IP Banning &gt; Message<\/em>) and enter your custom message in thetext area .<\/p>\n<figure id=\"attachment_221648\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221648 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/custom-lockout-message.png\" alt=\"Defender - Messages - Add a custom message to locked out users.\" width=\"961\" height=\"234\" \/><figcaption class=\"wp-caption-text\">Add a custom message to locked out users or use the default message provided.<\/figcaption><\/figure>\n<p>Anyone on the blocklist will now be greeted with your message.<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221628\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221628 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/ip-blocked-message.png\" alt=\"Defender Blocked IP message: The administrator has blocked your IP from accessing this website.\" width=\"600\" height=\"316\" \/><figcaption class=\"wp-caption-text\">Defender&#8217;s blocked IP message to unwelcome guests.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<h3>7. <a name=\"import\" target=\"_blank\"><\/a>Importing and Exporting Blocklist &amp; Allowlist<\/h3>\n<p>If you want to export your blocklist and allowlist to use on another website or import a blocklist or allowlist from another website into your site, Defender makes this quick and easy using the <strong>Import<\/strong> and<strong> Export<\/strong> features found at the bottom of the <em>IP Banning<\/em> screen.<\/p>\n<figure id=\"attachment_221649\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221649 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/import-export-ip.png\" alt=\"Import and export blocklist and allowlist.\" width=\"942\" height=\"405\" \/><figcaption class=\"wp-caption-text\">Import and export your blocklist and allowlist for use across different sites.<\/figcaption><\/figure>\n<p>Note that importing IP addresses from exported CSV files will not remove any existing IPs; these will simply be added to your existing lists. Also, export files include both your blocklist and allowlist.<\/p>\n<h3>8. <a name=\"logs\" target=\"_blank\"><\/a>Check Your Lockout Log for Suspicious Activity<\/h3>\n<p>In Defender\u2019s dashboard, head to <strong>Firewall <\/strong>&gt; <strong>Logs<\/strong>. Here, you can view all of your lockouts and quickly ban, allowlist, or delete the list, plus easily export activity logs of IP lockouts.<\/p>\n<figure id=\"attachment_221630\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221630 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/firewall-logs.png\" alt=\"Defender - Firewall - Logs\" width=\"1687\" height=\"1416\" \/><figcaption class=\"wp-caption-text\">Defender logs all lockout activities.<\/figcaption><\/figure>\n<p>You can find logs using a range of sorting and filtering functions, adjust the date range, and export these as a CSV file.<\/p>\n<div class=\"image-grid cgrid-row\">\n<div class=\"cgrid-col cgrid-col-span-full\">\n<figure id=\"attachment_221652\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221652 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/filter-logs.png\" alt=\"Defender Firewall logs - filters\" width=\"959\" height=\"573\" \/><figcaption class=\"wp-caption-text\">Use the sorting and filtering features to find logged records quickly and easily.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<p>You can also expedite things using the <strong>Bulk Actions<\/strong> feature in Firewall &gt; Logs. Select all items at once or check individual boxes, then use the options in the dropdown menu and click the Apply button to ban, allowlist, or delete IP addresses.<\/p>\n<figure id=\"attachment_221653\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221653 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/logs-bulk-options.png\" alt=\"Defender - Firewall - Logs - Bulk options menu\" width=\"1247\" height=\"640\" \/><figcaption class=\"wp-caption-text\">Perform bulk IP address banning, allowlisting, or deletions using the Bulk Actions feature.<\/figcaption><\/figure>\n<p>To get more detailed information about the logged event, click on the dropdown arrow next to an item. You\u2019ll also have the option to allowlist or ban the IP in this section.<\/p>\n<figure id=\"attachment_221654\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221654 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2020\/07\/log-description.png\" alt=\"Defender Logs - Description of log events.\" width=\"1361\" height=\"674\" \/><figcaption class=\"wp-caption-text\">See detailed descriptions of logged events and ban the IP address or add it to your allowlist.<\/figcaption><\/figure>\n<p>And just like that, all of your lockouts are now taken care of.<\/p>\n<h2 id=\"unlock-me\">Locked Yourself Out? Here&#8217;s How To Get Back In<\/h2>\n<p>Defender offers so many options to lock out unwanted visitors&#8230;but, what if you accidentally lock yourself out due to multiple failed login attempts?<\/p>\n<p>If you are the administrator of the site and you&#8217;ve locked yourself out, there&#8217;s an easy and secure way to get back in.<\/p>\n<p>If you have exceeded the number of valid login attempts (set in Defender&#8217;s <a href=\"https:\/\/wpmudev.com\/docs\/wpmu-dev-plugins\/defender\/#threshold\" target=\"_blank\" rel=\"noopener\">Firewall &gt; Threshold<\/a> settings), you will see a screen like the one shown below.<\/p>\n<p>Click on the <strong>Unlock Me<\/strong> button.<\/p>\n<figure id=\"attachment_221621\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221621 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2022\/06\/unlock-me-01.png\" alt=\"Defender Access Denied with Unlock Me feature\" width=\"916\" height=\"779\" \/><figcaption class=\"wp-caption-text\">Accidentally locked yourself out? Defender&#8217;s Unlock Me feature lets you get back in!<\/figcaption><\/figure>\n<p>Enter the username or the email address associated with the site&#8217;s login and click the <strong>Unlock Me<\/strong> button again. An email will be sent to your email address with a link to unlock yourself.<\/p>\n<figure id=\"attachment_221622\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-221622 size-full\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2022\/06\/unlock-me-02.png\" alt=\"Defender's Unlock Me feature screen.\" width=\"1020\" height=\"805\" \/><figcaption class=\"wp-caption-text\">Enter your admin username or email and click the button to regain access.<\/figcaption><\/figure>\n<h2><a id=\"post-4141-_mm0vav9qru09\" target=\"_blank\"><\/a>Setting Up a Lockout Firewall Can\u2019t Get Any Easier<\/h2>\n<p>Unwanted guests won\u2019t get far with Defender\u2019s custom IP address lockout.<\/p>\n<p>And, as you can see, it\u2019s more than just an IP address lockout feature &#8212; you can create custom messages, set location banning, view and edit logs, and so much more.<\/p>\n<p>For more tips on using Defender, check out our articles about <a href=\"https:\/\/wpmudev.com\/blog\/delete-suspicious-code-defender\/\" target=\"_blank\" rel=\"noopener\">finding &amp; deleting suspicious code<\/a> and how to <a href=\"https:\/\/wpmudev.com\/blog\/stop-hackers-with-defender-wordpress-security-plugin\/\" target=\"_blank\" rel=\"noopener\">stop hackers in their tracks<\/a>.<\/p>\n<p>For more information about using all the security features of the plugin, <a href=\"https:\/\/wpmudev.com\/docs\/wpmu-dev-plugins\/defender\/\" target=\"_blank\" rel=\"noopener\">check out Defender&#8217;s documentation page<\/a>.<\/p>\n<p><em>[Editor\u2019s note: This post was originally published in July 2023 and updated in March 2024 for accuracy.]<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WPMU DEV\u2019s 5-star security plugin, Defender, lets you easily set up a firewall, block IP addresses with custom blocklists and allowlists, and more&#8230;leaving unwelcome visitors unable to step even near your WordPress site. Hackers can be persistent at trying to get into your site and drop malicious code, figuring out your credentials, and leaving spam.\u00a0This [&hellip;]<\/p>\n","protected":false},"author":811449,"featured_media":221667,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"9","wds_primary_category":11259,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263,11260,11259],"tags":[],"tutorials_categories":[11231],"class_list":["post-189843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-wpmu-dev-products","category-wpmudev-tutorials","tutorials_categories-defender-pro"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/189843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/811449"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=189843"}],"version-history":[{"count":42,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/189843\/revisions"}],"predecessor-version":[{"id":221633,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/189843\/revisions\/221633"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/221667"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=189843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=189843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=189843"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=189843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}