With the Magento 2 Web Security module, the admin can provide security services for the Magento store from hackers. The admin can restrict any particular file type to get uploaded on the website and can ban the website for any country and IP address.
Brute force attack notifications to the admin and validation for the customer email address options are also available.
To use this extension the store owner must have the access to the following third parties services:-
Here comprehend the web security plugin workflow:-
The Magento 2 Web Security module provides admin to enable the unrecognized login notification.
Master Password feature to block all sub-user accounts.
Allow admin to get each file upload notification in the system.
Admin can prevent file types to be upload.
Ban any country from login into the admin panel.
Admin can prevent the admin panel from a Brute Force attack.
Brute force logs available to admin.
Admin blacklist/whitelist IPs.
AbuseIPDB integrated to block and report IP.
Mailboxlayer integrated to validate emails for customers.
Real-time email validation for customers by admin.
Create custom email templates for each action.
Customers will get a zip folder and they have to extract the contents of this zip folder on their system. The extracted folder has an src folder, inside the src folder you have the app folder. You need to transfer this app folder into the Magento2 root directory on the server as shown below.
After the successful installation, you have to run these commands in the Magento2 root directory.
First Command –
composer require geoip2/geoip2:~2.0
Second Command –
php bin/magento setup:upgrade
Third Command –
php bin/magento setup:di:compile
Fourth Command –
php bin/magento setup:static-content:deploy
After running the commands, you have to flush the cache from the Magento admin panel by navigating through->System->Cache management as shown below.
For the multilingual support, the admin will navigate through Store->Configuration->General ->Locale Options and select the locale as German (the language into which admin wants to translate his store content).
If you want to translate their module language from English to German then follow the path src/app/code/Webkul/WebApplicationFirewall/i18n in their unzipped Magento 2 web security folder. Then you will get a CSV file with the name “en_US.csv”.
Now, rename that CSV as to your region code and language code “de_DE.csv” and translate all right side content in your language.
After editing the CSV, save it and then upload it where you have installed Magento 2 on the server.
The module will get translated into your desired Language.
The admin needs to configure the following sections as mentioned below to integrate the Magento 2 web security into the Magento 2 web.
Under the general setting section, the admin will configure the following fields:Enable Magento Security: The admin needs to select “Yes” for enabling the following Magento 2 Security.
Get Alerts about Unrecognized Admin Logins: The admin will get alerts each time admin logins through unrecognized means.
Select CMS Page for Blocked IPs: The admin can select the CMS pages to be displayed for IPs which are blocked by the admin.
If the admin selects 404 Not Found as CMS Page to be displayed for the blocked IPs. Then consequently, If the users with blocked IPs will try to sign in they will see the following page as shown:
Send Password Reset Request
If the admin selects this option, all the sub-admin or users will be blocked and will be shared an email with the reset password link.
After that, the sub-admins will receive the following mail as shown below:
Malicious File Security
The admin will be able to enhance the Magento 2 web security of the website from malicious files by configuring the following as mentioned below.
Get Notification if Any File Uploads by Magento: The admin will get the notification for all the files uploaded on the Magento website.
Prevent Uploading File With Extension(s): Add the extensions that you want to prevent uploading on your website and get a notification for prevented file uploads.
Receive File Malicious Notification on Email Address: Set the Email Address on which the notification will be shared when the malicious file is uploaded.
Check Multi Extension: Enable it (set it to ‘Yes’) to check for multiple extensions.
Prevent Uploading File With Extension(s):
Admin/Sub-admin will get a notification for prevented file uploads as depicted below:
Also, the admin will receive a mail regarding this on the registered mail.
Receive File Malicious Notification on Email Address:
Ban User Country Wise
The admin can even configure to ban the country where the admin panel will not be accessible as mentioned below.
Enable: The admin can enable or disable this country ban functionality.
GeoIP2 Library: On selecting the Download (Update) GeoIP2 Library will update the library of detecting the current geolocation of the customer using his IP address.
Select Specific Countries: If enabled, the admin can select the country for which country ban will be enabled.
How to generate GeoIP Key?
To generate GeoIP Key, Navigate through Stores -> Configuration, and under the section Ban User Country Wise click on the “Sign up free for a MaxMind account“. You can also use this URL to create an account https://www.maxmind.com/en/geolite2/signup
You will land up on a Sign Up page to create a new account. By filling up the details create your new account. In case, you already have an account, you can login with your credentials.
This is how your account will look like after successfully setting it up. On the Left Hand Side, Under the Services click on “My License Key” to generate a new GeoIP key.
Here, You will get your License Key for usage with GeoIP Update.
IPs Allowed Setting in Web Security module for Magento 2
The admin will be able to configure the whitelisted and blacklisted IPs through the following fields as mentioned below.
Blacklist IP(s): The admin will be able to list all the blacklisted IPs by mentioning them in the following section. The admin can even block IPs for the complete classes like 192.168.1.*, 101.22.*.*
Whitelist IP(s): The admin will be able to list all the whitelisted IPs by mentioning them in the following section. The admin can even whitelist IPs for the complete classes like 192.168.1.*, 101.22.*.*
Enable IP Debug Log: The admin will be able to maintain the debug logs for enabling IP.
If any user with blacklisted IP will try to sign in then consequently the following page will be displayed:
Note:– If the admin has whitelisted any IP(s) then except for that particular IP, users with all other IPs will see the above depicted page on the login attempt.
Frontend Two Step Authentication
This functionality will allow the store owner to have two-step authentication for the login. The admin will be able to configure the following module:
Enable Google Two Factor Auth: The admin can enable or disable the two-factor authentication.
Enable “trust this device” option: If this option is enabled then you can set the trust device option.
Note: The trust this device will work with the HTTPS website only.
Protect Against Brute-force
The admin can configure the website against proxy login attacks by configuring the following sections as mentioned below.
Enable: The admin enable or disable the proxy login or brute force
Send Warning Emails To: Add the email address to which warning emails will be shared.
Send Alert on Each Login Failed: To receive alerts on every failed login.
Admin User Locked Alert: If enabled, the admin can send alert mail when an admin user is locked(Admin User Lock Setting: Advanced->Admin->Security)
The admin will receive the warning emails on the registered mail for each failed login attempts or proxy login attacks.
The admin can report IP abuse through the following module by configuring as mentioned below.
Activate: The admin needs to activate the following section.
API Key: Please add the API Key that you will get on creating the account on Abuse IPDB.
Max Days: Enter the number of days between 1-365 to determines how far back in time we go to fetch reports.
Report IPs If Brute Force Attempt Detected: If the proxy login attack is detected then the IP will be auto reported if enabled.
Block IP Based on Abuse Confidence Score: The admin can enable IP block based on the confidence score of the abuse.
Block IPs If Minimum Abuse Confidence Score: The admin can define the fixed score as to above which IP will be rejected.
Note: You need to signup for the Abuse IPDB and select a suitable plan. To know more, please visit the following link: HERE
After the successful registration, you will be directed to a page where you need to navigate to the API section. There you will get the required API key as shown below.
After registering for an AbuseIPDB account and getting an API key, You need to configure the following:
MailBox Layered Email Verification
The admin can enable the mailbox real-time layered email address verification
API Key: The admin can add the API keys as fetched on creating the account at mailboxlayer.com
Enable for Customer: The admin can enable the following mailbox at the customer end.
Note: You need to select the plan for the MailBox layer and to register for an account to generate an API key as shown below. To know more visit the following link: HERE
After the successful registration, you will be directed to a page where you can see the required API key as shown below.
Use this API Access key to configure the following:
Email Sender and Templates
The admin can set different templates that will be shared with the sub-user and admin in the following scenario as mentioned below.
Moreover, the admin can select the sender to whom the notification will be shared and assign a different templates for different scenarios.
Admin Login Logs
All the admin’s login logs will be displayed under the following section as shown in the image below.
On the whole, this feature enables the admin to identify whether the Magento store is on Production or Developer, or Default mode.
The admin needs to select the server hosting whether shared(one user) or private(two user). Consequently, the directories will be visible as shown in the image below.
Also, this will enable the admin to view all the files and their permission. In a brief, the admin will get the status error if the permission is not ideal.
In addition, this will help the admin to optimize the file permissions. Thus, it will protect the websites from any vulnerability of the site.
Brute Force Login Logs
This section will specifically keep a detailed record of all the brute force login logs. Thus, the store owner can view all the IPs and their login URL, browser and even the login time details.
To illustrate, please see the snapshot attached below:
In conclusion, this will help the admin to detect the frauds count and can even report them or can blocklist the frauds.
Customer Front End
Email Address Validation
If the admin has enabled the mailbox real-time layered email address verification. Then the customer will have to enter a valid email address during registration.
Otherwise, the following error message will be displayed as shown in the image below.
Two Factor Authentication
If the admin enables the two-factor authentication then the customer will have to go through two steps authentication for each time the customer logs in, subsequently. Thereafter, an OTP will generate which needs to be scan through the Google Authenticator to be input for the login.
After the first time registration, the customer will now navigate to the dashboard. Thereafter, the customer will register for two-step authentication as shown in the image below.
After registering, the customer will navigate to the QR code page. Thereafter, the customer will scan the QR through Google Authenticator. To illustrate, Please check the screenshot given below:
The OTP will be received on the Google Authenticator after scanning the QR code.
After the authentication, now the customer will add the OTP in the respective field. The OTP valid notification will display as shown in the image below. After the first login through Google authentication, the customer can enable or disable the OTP authentication.
The “Trust my device” option will help the customer to select those devices in which the OTP authentication will not be required even if the authentication is enabled.
After that, the customer will visit the OTP section again if you enable the Two Factor Authentication. The customer can now choose to add the device as a trusted device. If selected, the customer does not have to truly scan the QR code.
So, that’s all for the Magento 2 Web Security module, for any question/query, please raise a Ticket at our HelpDesk system. We are always happy to help you out. You can also get back to us via mail [email protected].
Current Product Version - 5.0.0
Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x