Menu Close
    Convert your store into Magento 2 Multi Vendor Marketplace

    Web Security Module For Magento 2

    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:-

    Features

    • 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.

    Installation

    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.

    webkul magento2 web security

    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.

    webkul magento2 web security

    Multilingual Support

    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).

    Configuration For Multilingual Support

    Module Translation

    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.

    translation-2

    Admin Configuration

    General Setting

    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.

    Configuration-Settings-Stores-Magento-Admin-Web-Security

    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:

    Page-not-found-web-security

    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.

    general_setting-2

    After that, the sub-admins will receive the following mail as shown below:

    Web-Security-Mail

    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.

    1. Get Notification if Any File Uploads by Magento: The admin will get the notification for all the files uploaded on the Magento website.
    2. 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.
    3. Receive File Malicious Notification on Email Address: Set the Email Address on which the notification will be shared when the malicious file is uploaded.
    4. Check Multi Extension: Enable it (set it to ‘Yes’) to check for multiple extensions.
    Malicious-Files-Security

    Prevent Uploading File With Extension(s):

    Admin/Sub-admin will get a notification for prevented file uploads as depicted below:

    Disallowed-file-type-web-security

    Also, the admin will receive a mail regarding this on the registered mail.

    Web-security-mail-1

    Receive File Malicious Notification on Email Address:

    web-security-new-file-alert

    Ban User Country Wise

    The admin can even configure to ban the country where the admin panel will not be accessible as mentioned below.

    1. Enable: The admin can enable or disable this country ban functionality.
    2. 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.
    3. Select Specific Countries: If enabled, the admin can select the country for which country ban will be enabled.
    Configuration-Settings-Stores-Magento-Admin-1

    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

    GeoIP-1-777x1024-2-final-part-2

    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.

    GeoLite2-Sign-Up-MaxMind-2..

    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.

    Account-Summary-MaxMind-3..
    License-Keys-MaxMind-4-1200x538-3-final

    Here, You will get your License Key for usage with GeoIP Update.

    New-license-key-successfully-created-MaxMind-5-1200x540-4-final

    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.

    1. 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.*.*
    2. 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.*.*
    3. Enable IP Debug Log: The admin will be able to maintain the debug logs for enabling IP.
    IPs-Allowed-Setting

    If any user with blacklisted IP will try to sign in then consequently the following page will be displayed:

    https-magento234-webkul-com-ee2401-admin-admin-system_config-edit-key-45e0d2d7586ccfa48ed6fc112e7168619dfab7f7763255f81674b541fe07c214-section-waf_setting-

    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:

    1. Enable Google Two Factor Auth: The admin can enable or disable the two-factor authentication.
    2. 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.

    Frontend-Two-Step-Authenticaton

    Protect Against Brute-force

    The admin can configure the website against proxy login attacks by configuring the following sections as mentioned below.

    1. Enable: The admin enable or disable the proxy login or brute force
    2. Send Warning Emails To: Add the email address to which warning emails will be shared.
    3. Send Alert on Each Login Failed: To receive alerts on every failed login.
    4. 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)
    Frontend-Two-Step-Authenticaton-2

    The admin will receive the warning emails on the registered mail for each failed login attempts or proxy login attacks.

    Web-Security-brute-force

    Abuse IPDB

    The admin can report IP abuse through the following module by configuring as mentioned below.

    1. Activate: The admin needs to activate the following section.
    2. API Key: Please add the API Key that you will get on creating the account on Abuse IPDB.
    3. Max Days: Enter the number of days between 1-365 to determines how far back in time we go to fetch reports.
    4. Report IPs If Brute Force Attempt Detected: If the proxy login attack is detected then the IP will be auto reported if enabled.
    5. Block IP Based on Abuse Confidence Score: The admin can enable IP block based on the confidence score of the abuse.
    6. 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

    Register-AbuseIPDB

    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.

    Webkul-User-Control-Panel-AbuseIPDB-333

    After registering for an AbuseIPDB account and getting an API key, You need to configure the following:

    AbuseIPDB

    MailBox Layered Email Verification

    The admin can enable the mailbox real-time layered email address verification

    1. API Key: The admin can add the API keys as fetched on creating the account at mailboxlayer.com
    2. 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

    Sign-Up-mailboxlayer-API

    After the successful registration, you will be directed to a page where you can see the required API key as shown below.

    Account-Dashboard-mailboxlayer-API-222

    Use this API Access key to configure the following:

    Mailbox-Layer-Real-Time-Email-Address-Validation-1

    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.

    Email-Sender-and-Templates

    Admin Login Logs

    All the admin’s login logs will be displayed under the following section as shown in the image below.

    Admin-Login-Logs-Magento-Admin-11

    View Permissions

    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.

    magento2 security view permissions

    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:

    Brute-Force-Login-Logs-Magento-Admin-final-brute-force

    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.

    Magento2 security customer account

    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.

    Note: You need to have the Google Authenticator Application installed on the mobile in order to scan the QR Code.

    Specifically for iOS click the link to get Google Authenticator https://apps.apple.com/in/app/google-authenticator/id388497605

    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.

    Magento2 security Google authentication register

    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:

    QR code

    The OTP will be received on the Google Authenticator after scanning the QR code.

    img_20201202_wa0022

    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.

    my account page

    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.

    Magento2 security two factor authentication

    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

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    2 comments

  • Michael
    Does it work with IP2Location LITE database?
    • Rajan Dimri (Moderator)
      Hello Michael,
      Currently, it works with MaxMind’s IP Geolocation services, AbuseIPDB API, and MailBoxLayer Services. Further, if you’ve any other requirements please email us at [email protected] and we will assist you accordingly.

      Thank you

  • Back to Top

    Table of Content

    Hide Index