Magento 2.4.2 We can't save customer + Bot Attack - Firewall

Keywords: Magento - AWS - Technical issue - Permissions

bnsupport ID: 2b1da99b-70f1-440b-95d0-6e6b61d2d1cb

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/

bndiagnostic failure reason: Other

Description:
Hello Support Specialists at Bitnami,
There is an issue that I face whilst adding a customer and logging in as a customer on Magento 2.4.2 out of the box setup. After troubleshooting several ways - formkey, env (not modified - suggested in public forum elsewhere to change “files” to “db” in env but I havent made that change), I am facing unusal error such as “We can’t save the customer.” Form refreshes. But on the otherhand, when a customer places an order via Express Checkout, the credentials are saved and visible on backend. Also customer cannot be created via Admin. - Error - Something went wrong whilst adding a customer. I am not sure if this is due to Google reCaptcha v2 v3 Invisible - Please advise!

Also, I have also experienced bot attack but I have managed to control it somehow. Bitnami tutorial of Deny Connection is implemented. Prefer to use Cloudflare to protect resources such as Block IP + Block HTTP Version (1.0 to 3.1) Requests + Request Method (Block All) + ThreatScore > 5 + Enable Bot Fight Mode + Custom Rule to Protect Login via Rate Limiting on Admin Login Page. Set Security Level to High. Experienced TOR Attack as well. Constant tweak and optimisation is mandatory.

Other issues experienced -

SIGTERM
SSTP_DUPLEX_POST
eval-stdin.php in Error Log

Any advise?

Steps to view IP Addresses that are malicious -

cd /opt/bitnami/apache2/logs/
tail -n 10000 access_log | awk ‘{print $1}’| sort| uniq -c| sort -nr| head -n 10

Steps to view unauthenticated HTTP Requests -

cd /opt/bitnami/apache2/logs/
sudo nano error_log
CTRL+X
sudo nano access_log
CTRL+X

Bitnami Configuration is brilliant when its coupled with Cloudflare!

Also block Magento Web API via Magento Admin > Stores > Web API Security > YES

Enable Rate Limiting via Magento Admin > Authentication Locks > Login Failures to Lock Out Account > Set a Lower Number and increase Lockout Time (seconds) - Higher Number

Hello @weskyprint,

Thank you for using our solution and for your feedback.

We have a guide to troubleshoot magento issues. Could you take a look at this?
https://docs.bitnami.com/bch/how-to/troubleshoot-magento-issues/

The support tool did not get the magento folder permissions. Let me share with you the default permissions:

/bitnami/magento/:
total 1.8M
drwxr-xr-x  6 root    root   4.0K Jul 23 11:00 ..
drwxrwxr-x  2 bitnami daemon 4.0K Jul 28 09:16 uploads
drwxr-xr-x  2 root    root   4.0K Jul 28 09:16 tmp
drwxrwxr-x  4 bitnami daemon 4.0K Jul 28 09:16 dev
drwxrwxr-x  6 bitnami daemon 4.0K Jul 28 09:16 pub
drwxrwxr-x 53 bitnami daemon 4.0K Jul 28 09:16 vendor
-rw-r--r--  1 root    root   1.3K Jul 28 09:16 package.json.sample
-rw-r--r--  1 root    root    11K Jul 28 09:16 LICENSE_AFL.txt
-rw-rw-r--  1 bitnami daemon  700 Jul 28 09:16 SECURITY.md
-rw-r--r--  1 root    root   1.5K Jul 28 09:16 .php_cs.dist
-rw-rw-r--  1 bitnami daemon 3.0K Jul 28 09:16 Gruntfile.js.sample
-rw-rw-r--  1 bitnami daemon 936K Jul 28 09:16 composer.lock
-rw-r--r--  1 root    root   749K Jul 28 09:16 CHANGELOG.md
-rw-r--r--  1 root    root   6.8K Jul 28 09:16 nginx.conf.sample
-rw-rw-r--  1 bitnami daemon  11K Jul 28 09:16 LICENSE.txt
-rw-rw-r--  1 bitnami daemon  12K Jul 28 09:16 .htaccess.sample
-rw-rw-r--  1 bitnami daemon  214 Jul 28 09:16 .htaccess
-r--r-----  1 root    root    101 Jul 28 09:16 .user.ini
-rw-rw-r--  1 bitnami daemon   55 Jul 28 09:16 grunt-config.json.sample
-rw-rw-r--  1 bitnami daemon  266 Jul 28 09:16 .editorconfig
-rw-rw-r--  1 bitnami daemon  650 Jul 28 09:16 COPYING.txt
-rw-rw-r--  1 bitnami daemon 2.6K Jul 28 09:16 composer.json
-rw-rw-r--  1 bitnami daemon    0 Jul 28 09:16 .buildcomplete
-rw-rw-r--  1 bitnami daemon  150 Jul 28 09:16 auth.json.sample
drwxrwxr-x  7 bitnami daemon 4.0K Jul 28 09:16 setup
drwxr-xr-x  2 root    root   4.0K Jul 28 09:16 bin
drwxrwxr-x  8 bitnami daemon 4.0K Jul 28 09:16 var
drwxrwxr-x  2 bitnami daemon 4.0K Jul 28 09:16 licenses
drwxrwxr-x  3 bitnami daemon 4.0K Jul 28 09:16 generated
drwxrwxr-x  4 bitnami daemon 4.0K Jul 28 09:16 app
drwxr-xr-x  2 root    root   4.0K Jul 28 09:16 phpserver
drwxrwxr-x 15 daemon  root   4.0K Jul 28 09:16 .
drwxrwxr-x  4 bitnami daemon 4.0K Jul 28 09:16 lib

Please note that Bitnami packages and configures already existing applications. However, we can only offer support and help on basic and most frequent application configurations. Always based on the default configuration or on our guides.

If you have the correct permissions, probably someone with more experience and knowledge about that specific tool can help you better than we can. We suggest you to post your question on the official support forums of the application so others can help you.

https://community.magento.com/

Do not hesitate to write us back if you have any other questions regarding the Bitnami solutions or their configuration.

Also, I have found a couple of similar issues that may help:
https://magento.stackexchange.com/questions/114469/we-cant-save-the-customer-alert-on-magento-2
https://community.magento.com/t5/Magento-2-x-Programming/ERROR-in-Create-New-Account-Magento-2/td-p/100385

Regards

Hey @davidg
Thanks for the heads up on permission structure. I have checked mostly everywhere, still unable to find a solution. Let me check with @gongomgra incase he finds an alternative to this problem. This is a critical issue that needs a fix.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.