Jump to content

Navid

Priority Members
  • Joined

  • Last visited

Everything posted by Navid

  1. After reviewing the code, I've made some improvements for better readability and maintainability. The functionality remains the same, but the code is now more structured and clearer. Here's the revised version: perlCopy # added by Navid if ($config{LF_MODSEC} && $globlogs{MODSEC_LOG}{$lgfile} && $line =~ /^\[\S+ \S+ \S+ \S+ \S+\] \[(\w*)?:error\] (\[pid \d+(:tid \d+)\]) \[client \S+:\S+\] \[client (\S+)\] ModSecurity:(( \[[^\]]+\])*)? Access denied/,/) { my $ip = $4; $ip =~ s/^::ffff://; $ip =~ s/:\d+$// if split(/:/, $ip) == 2; my $ruleid = "unknown"; if ($line =~ /\[id "(\d+)"\]/) { $ruleid = $1; } if (checkip($ip)) { return ("mod_security (id: $ruleid) triggered by", $ip, "mod_security-custom", "4", "80,443", "1"); } else { return; } } # ended by Navid Changes made to the code: Replaced the and operator (&&) instead of and for better Perl coding practice. Reorganized the conditional checks to be more concise and easier to read. Simplified the conditional statement for removing the port number from the IP address. Added curly braces for better clarity and readability. Note: if there is missed please advice me. thank you.
  2. Hi, kindly some one help us on how to update/ upgrade Mode Security to latest version : v3.0.13 on cwp panel please thank you so much
  3. Hi, dear Sandeep thank you so much for you a very nice and useful guide on cURL. but as you know the latest is cURL 8.11.1 could you please confirm and update the code for the latest cURL??? note: does the Latest cURL is capable with cwp? thank you and waiting for you guide. regards.
  4. thank you so much this topic help me a lot your sincerely
  5. Hi, dear masters, I would like to install the latest version of the cURL on centos 7 Kindly guide me on how can apply this scenario because I did as below; rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-2-1.rhel7.noarch.rpm yum --enablerepo=city-fan.org update curl libcurl libcurl-devel but it is not working. thank you so much.
  6. Hi, this week I got a lot of attack which was on the below path: 2025/01/12 15:02:08 [error] 762#762: *1768584 openat() "/usr/local/apache/autossl_tmp/.well-known/acme-challenge/ALFA_DATA/alfacgiapi/bash.alfa" failed (2: No such file or directory), client: 68.183.234.75, server: mysite.com, request: "GET /.well-known/pki-validation/ALFA_DATA/alfacgiapi/bash.alfa HTTP/2.0", host: "www.mysite.com" and they trying to redirecting the website on which one they want, as well there was a huge DDoS attack on same path. kindly advice me on how can make it secure the centos 7 with cwp please. I put a scenario below for some security step : edit htaccess file on the root by: thank you
  7. Hi, thank you very much, yes it does, everything was good 3 days before, but suddenly it seem issue in rdns kindly guide me what if I setup new server by alma9 but I’m not sure CWP support alma 9? what is the solution thank you
  8. Hi, thank you dear sandeep for your time and efforts to resolve our issue it’s to much worthy for us indeed. yes the 53 port is sat correctly to open in all mood tcp and udp waiting for further solution please thank you.
  9. Hi, dear Master please guide me on does it possible to Migrating from CentOS7 to AlmaLinux9 (same server) without installing to new server? I having Centos7 and willing to Migrating to Almalinux9 without new installation to the new server? if possible please guide me. Note: i found the below articles but I’m not sure it will work or no. source link: AlmaLinux vs. Rocky Linux: a com...AlmaLinux vs. Rocky Linux: a comparison and guide - Hosti...
  10. Hi, dear masters I having issue with my rDNS which are showing rDNS/PTR = FAILED I have attached a screen shot for further help and kindly guide me on how can resolve this issue. Postfix Mail Server Manager Rebuild your mail server with Amavisd, Spamassassin, ClamAV (AntiSpam and AntiVirus Protection) Hostname needs to have a valid A record and rDNS/PTR set for successful email delivery. **Reject the request when the hostname in the client HELO (EHLO) command has no DNS A or MX record. The unknown_hostname_reject_code specifies the response code to rejected requests (default: 450). Your Hostname is: cloud.signalprime.com and it resolves to IP: ; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.16 <<>> A cloud.signalprime.com +short @8.8.8.8 ;; global options: +cmd ;; connection timed out; no servers could be reached [Check Black List] rDNS/PTR = FAILED, check with your hosting provider!FAILED[Check SenderBase] rDNS/PTR check for IP 116.202.219.107 = ; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.16 <<>> -x 116.202.219.107 +short @8.8.8.8;; global options: +cmd;; connection timed out; no servers could be reached rDNS/PTR check for IP 116.202.219.96 = ; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.16 <<>> -x 116.202.219.96 +short @8.8.8.8;; global options: +cmd;; connection timed out; no servers could be reached kindly guide me please thanks.
  11. Hi, I hope you are doing well. whenever i ran this command all things goes as expected well. curl -s -L https://www.alphagnu.com/upload/centos7-repo-fix.sh | bashbut when trying to update the system by: yum update: I getting the bellow error. yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: d2lzkl7pfhq30w.cloudfront.net No packages marked for update kindly guide me what is the issue thank you
  12. HI, dear Master Sandeep for your nice help and your precious time. Kindly what about the below ink tutor I mean is it necessary or your solution will be enough https://www.superspeedyplugins.com/kb/performance-optimization/stack-guides-tips/configuring-nginx-pass-real-ip-addresses-cloudflare-compatible-fail2ban-wordpress/ thank you so much regards
  13. Hi, Dear support team I facing a very strange issue for 3 past days, the problem that I’m facing is showing me just the Cloudflare IP, not the real IP that connects to our server and our websites. It happened 3 days ago and it continued, before this issue the real IP that connected to each website was shown and visible on the security center incident and log files but right now just showing Cloudflare IP: https://www.cloudflare.com/ips-v4/ that we are using it as proxy and some other security measures. I don’t know what is happening because I don’t bring any changes. I did some research on X-Forwarded-For or CF-Connecting-IP but I can’t find solutions for cwp and this specific problem Kindly guide me on how can resolve this issue I have attached a screenshot for your further help. Regards.
  14. HI, Dear Mr Sandeep I hope you and your honor family are safe and rounded by Gold bless. I have two question about my.cnf what if I add this line into my.cnf: init-connect='SET NAMES utf8' Because I would to support fully UTF8??? second ad you advice I have to remove this line: default_storage_engine = MyISAM or just remove MyISAM from the end of the line??? or I have to remove completely the line??? thank you very much for you answer in advance regards.
  15. Thank you so much it's work perfectly, and it save me. thank you so much from both of your gentleman!
  16. Hi, thank you so much Dear Sandeep, it not work fine, it's work perfectly. Appreciated!
  17. Hi, sorry I forgot to ask you it's deploy able in centos7?
  18. Salute, Gold Bless you. thanks
  19. salute, and thank you so much for your very brief guide, just one more question please: what if would to use the latest Mariadb I mean(11.4.2). secondly: there is no need to take back from old Mariadb? thank you
  20. Dear Netio please describe your bash? what is this for this bash? and what it will execute in the server??
  21. Hi, kindly need your more description to run your bash please: curl -s -L https://www.alphagnu.com/upload/centos7-repo-fix.sh | bash
  22. Hi, dear Sandeep it's very important to know how can UPgrade MariaDB to last and stable one. 1- I need to upgrade MariaDB from 10.5 to MariaDB 10.11.210.11.2. or higher 2- and need to upgrade nginx to 1.23.3 or latest one. kindly need your help and your full guide please thank you very much.
  23. Hi, Thank you very much Dear Sandeep you're always helpful, cwp without unimaginable. appreciated
  24. HI, I hope you are doing well, Just I would like to ask, that I want to change the : /etc/my.cnf as below but I'm not sure it will be correct or need amendment ?? kindly reviwe the my.cnf file and advice me. because I need to optimze the DB and would like to use mySIM as a default storage. # # This group is read both by the client and the server # use it for options that affect everything # [client-server] [mysqld] default_storage_engine = MyISAM max_connections = 30000 max_user_connections=10000 innodb_lock_wait_timeout=120 max_heap_table_size = 1G tmp_table_size = 1024M thread_cache_size = 128 innodb_buffer_pool_size = 2G innodb_log_file_size = 2G innodb_buffer_pool_instances = 10 innodb_flush_method = O_DIRECT innodb_file_per_table = 1 innodb_flush_log_at_trx_commit = 2 table_open_cache = 5000 wait_timeout = 28800 interactive_timeout = 28800 long_query_time = 25 max_allowed_packet = 512M performance_schema = OFF open_files_limit = 220000 key_buffer_size = 64M join_buffer_size = 5M sort_buffer_size = 5M read_buffer_size = 2048k read_rnd_buffer_size = 2048k query_cache_type = 1 query_cache_size = 250M query_cache_limit = 64M max_connect_errors = 10 tmp_table_size = 550M max_heap_table_size = 500M innodb_file_per_table=1 # # include *.cnf from the config directory # !includedir /etc/my.cnf.d regards.
  25. HI, I would to Import and big database file around 2.5 G, to a user account(website) kindly guide on how can I cope with please. Note: I used this command : mysql -u alemaren_gild -p alemaren_statute < alemaren_english.sql but it's not working and I getting access dined error. waiting for you help thanks.