+ إنشاء موضوع جديد
النتائج 1 إلى 2 من 2
  1. #1
    Status
    Offline
    الصورة الرمزية Rise Company
    Engineering and Technology
    تاريخ التسجيل
    Apr 2014
    الدولة
    Egypt
    المشاركات
    4,628
    معدل تقييم المستوى
    10

    افتراضي فايروول CSF Firewall كل ما يتعلق بايبيهات الكلاود فلير Cloudflare


    فايروول CSF Firewall كل ما يتعلق بايبيهات الكلاود فلير Cloudflare
    كيفية تفعيل mod_remoteip لاظهار ايبيهات الكلاود فلير داخل whm/cpanel
    Whitelist Cloudflare IPS - Easiest way to install mod_cloudflare on latest CPanel
    mod_remoteip - CSF banning cloudflare ip - mod_cloudflare for Apache

    المشكلة :

    الكلاود فلير له ايبيهات خاصة به بروكسي تفعل دائما لزوار الموقع
    وعند وجود سبب يؤدى الى حظر اي بي الزائر يكون الحظر ليس صحيح !!!

    حيث ان الحظر يتم على الاي بي البروكسي و ليس اي بي الزائر فهو غير ظاهر
    وبالتالى يقوم الفايروول بحظر الاي بي الخطا وليس الزائر الحقيقي



    حل المشكلة خطوتين

    1- منع عمل بلوك لرينج ايبيهات الكلاود فلير (Deny / Whitelist )

    اما ان تضعها داخل Allow او Ignore
    كلاهما يعمل بدون مشاكل ولكن الفرق Allow تفتح ports وبالتالى غير امن ولا حاجه له اصلا
    اما ignore هو الصحيح حيث تبلغ الفايروول تجاهل الايبيهات من الحظر

    ملحوظة : الفايروول csf احيانا من تلقاء نفسه يضع هذه الايبيهات داخل deny اذا لم تجدها فضعها مثل الشرح
    ايبيهات الكلاود فلير هم 15 بتاريخ 12-2021
    https://www.cloudflare.com/ips-v4

    كود:
    173.245.48.0/20
    103.21.244.0/22
    103.22.200.0/22
    103.31.4.0/22
    141.101.64.0/18
    108.162.192.0/18
    190.93.240.0/20
    188.114.96.0/20
    197.234.240.0/22
    198.41.128.0/17
    162.158.0.0/15
    104.16.0.0/13
    104.24.0.0/14
    172.64.0.0/13
    131.0.72.0/22
    اذا زاد عدد الايبيهات فى المستقبل يجب اضافتها ايضا حتى لا يسبب مشاكل
    وهناك سركبتات تسحب الايبيهات تلقائيا.

    داخل whm افتح terminal وضع الامر

    كود:
    nano /etc/csf/csf.ignore
    ثم ضع الايبيهات وبعد الانتهاء ctrl+x ثم y


    ملحوظة : انتبه ! لا تخطا وتضع الايبيهات فى Deny !!! انتبه هى Ignore
    2- اظهار ايبيهات الكلاود فلير الحقيقية من خلال (mod_remoteip)

    داخل whm اذهب الى المسار التالى
    Home »Software »EasyApache 4» Apache Modules
    ثم ابحث عن mod_remoteip وفعلها وبعد مده next حتى الاخر Provision



    المرجع :
    https://www.cloudflare.com/ips-v4
    https://forums.cpanel.net/threads/cl...alerts.520411/
    https://forums.cpanel.net/threads/wh...re-ips.646089/
    https://forums.cpanel.net/threads/cs...are-ip.670965/
    https://github.com/cloudflare/mod_cloudflare
    https://support.cloudflare.com/hc/en...cles/200170786

    ------------------------------------------------------------------------
    شركة رايز للهندسة و التكنولوجيا Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    رقم # 1 فى خدمات الشركات Business Services

    استضافة مواقع Web Hosting - عمل ايميل شركة Business Emails

    تصميم موقع شركة Web Design - تسويق الكترونى على جوجل Google Adwords

    www.rise.company | www.rise.company/emails

    ملحوظة : جميع خدماتنا مخصصة للشركات فقط وغير متاحة للافراد
    وليس لنا اى منتجات او صيانة نهائيا! يرجى الانتباه الى ذلك.



  2. #2
    Status
    Offline
    الصورة الرمزية Rise Company
    Engineering and Technology
    تاريخ التسجيل
    Apr 2014
    الدولة
    Egypt
    المشاركات
    4,628
    معدل تقييم المستوى
    10

    افتراضي رد: فايروول CSF Firewall كل ما يتعلق بايبيهات الكلاود فلير Cloudflare

    Do not "Allow" cloudflare ranges. This only opens ports to them and is unnecessary. You need to add their ranges to /etc/csf/csf.ignore (NOT csf.allow) and fully restart both csf and lfd via WHM. This will stop CSF from blocking those IPs while still allowing ModSecurity to block individual bad requests.

    Obviously once that is done, audit csf.deny and remove any cloudflare IP addresses (or just remove any addresses which you did not add manually, and allow the blocks to repopulate).

    CloudFlare IP Ranges | CloudFlare | The web performance & security company

    ---------------------------

    You also may want to look at switching from mod_cloudflare since it's no longer supported or maintained by CloudFlare

    https://support.cloudflare.com/hc/en...mod-cloudflare said:
    Cloudflare no longer updates and supports mod_cloudflare, starting with versions Debian 9 *and *Ubuntu 18.04 LTS of the Linux operating system. We now support mod_remoteip for customers using Apache web servers. Customers who are interested in building the mod_cloudflare package can download the codebase from GitHub.
    mod_remoteip is the recommended method for this now and I wrote a pretty detailed how-to on this not very long ago which you can find here: Easiest way to install mod_cloudflare on latest CPanel since it's not available in EA?

    Also, ConfigServer Firewall Comes prebuilt with CloudFlare IP's integrated this is detailed in Section 27 of their readme.txt file:

    https://download.configserver.com/csf/readme.txt said:
    27. CloudFlare
    ##############

    This features provides interaction with the CloudFlare Firewall.

    As CloudFlare is a reverse proxy, any attacking IP addresses (so far as
    iptables is concerned) come from the CloudFlare IP's. To counter this, an
    Apache module (mod_cloudflare) is available that obtains the true attackers
    IP from a custom HTTP header record (similar functionality is available
    for other HTTP daemons.

    However, despite now knowing the true attacking IP address, iptables cannot
    be used to block that IP as the traffic is still coming from the CloudFlare
    servers.

    CloudFlare have provided a Firewall feature within the user account where
    rules can be added to block, challenge or whitelist IP addresses.

    Using the CloudFlare API, this feature adds and removes attacking IPs from that
    firewall and provides CLI (and via the UI) additional commands.

    There are several restrictions to using this feature:

    1. All lfd blocks will be temporary blocks so that csf/lfd can keep blocks in
    sync with CloudFlare

    2. Automatic blocks via lfd are limited to LF_MODSEC and LF_CXS triggers as
    only through these can the domain name be determined. Any users that own
    domains that are involved in the trigger will get a block in their
    CloudFlare Firewall. Additionally, any users with the special case "any"
    will also get blocks

    3. The temporary/permanent config of the lfd settings are ignored and CF_TEMP
    is used instead

    4. LF_TRIGGER must not be used, the feature will not work with it enabled

    5. mod_cloudflare or similar must be used to report real IP in the Apache logs

    6. URLGET must be set to 2 (i.e. LWP) must be used

    7. If PERMBLOCK is used, the last tempblock will remain and never be cleared.
    So any CloudFlare Firewall entries must be manually cleared in CloudFlare
    or via CLI


    8. There are restrictions imposed by CloudFlare to the number of rules that
    can be created depending on the type of account used. See
    https://goo.gl/ssGu7v for more information

    9. When restarting csf, any old temporary blocks will still be created for lfd
    to clear when it restarts

    10. All interaction with CloudFlare is at User-level, not Zone-level

    11. If using the CloudFlare cPanel user plugin, it must be v7+

    CF_TEMP should be configured taking into account the maximum number of rules
    that the CloudFlare account allows: https://goo.gl/ssGu7v

    All CloudFlare users for the domains that are involved in LF_MODSEC and
    LF_CXS triggers will have a CloudFlare rule added. Any CloudFlare account
    configured to use the special case "any" field value in csf.cloudflare will
    have a CloudFlare rule added regardless of domain.

    NOTE: You should always list the CloudFlare IP addresses in /etc/csf/csf.ignore
    to prevent them from being blocked by lfd from IP Ranges | Cloudflare

    ------------------------------------------------------------------------
    شركة رايز للهندسة و التكنولوجيا Rise Company for Engineering & Technology
    ------------------------------------------------------------------------
    Web Hosting | Web Designing | E-Marketing

    رقم # 1 فى خدمات الشركات Business Services

    استضافة مواقع Web Hosting - عمل ايميل شركة Business Emails

    تصميم موقع شركة Web Design - تسويق الكترونى على جوجل Google Adwords

    www.rise.company | www.rise.company/emails

    ملحوظة : جميع خدماتنا مخصصة للشركات فقط وغير متاحة للافراد
    وليس لنا اى منتجات او صيانة نهائيا! يرجى الانتباه الى ذلك.



المواضيع المتشابهه

  1. كلاود فلير CloudFlare ما هو known bots داخل List لتجنب عمل حظر لها
    بواسطة Rise Company في المنتدى قسم الكلاود فلير CloudFlare
    مشاركات: 0
    آخر مشاركة: 08-10-2021, 19:56
  2. كلاود فلير CloudFlare الفرق بين cloudflare js challenge vs Google captcha
    بواسطة Rise Company في المنتدى قسم الكلاود فلير CloudFlare
    مشاركات: 0
    آخر مشاركة: 08-10-2021, 19:43
  3. الفرق بين فايروول فورتي جيت FortiGate Firewall و فايروول سوفوس Sophos Firewall
    بواسطة Rise Company في المنتدى رايز للسكيورتي Rise Security
    مشاركات: 0
    آخر مشاركة: 23-06-2021, 01:39
  4. كلاود فلير CloudFlare يتعارض مع فايروول CSF ويتوقف بسبب اختفاء visitor’s original IP
    بواسطة Rise Company في المنتدى قسم الكلاود فلير CloudFlare
    مشاركات: 0
    آخر مشاركة: 16-12-2020, 01:33
  5. فايروول فورتي جيت FortiGate Firewall حساب الكلاود للتحكم من بعد FortiCloud Account
    بواسطة Rise Company في المنتدى قسم فايروول Fortigate
    مشاركات: 0
    آخر مشاركة: 02-08-2019, 22:17

المفضلات

المفضلات

ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •