URL test on CDN (Cloudflare) hosted domains

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
steffen
Posts: 3
Joined: Tue Jun 25, 2019 4:14 am

URL test on CDN (Cloudflare) hosted domains

Post by steffen »

I find that websites running behind Cloudflare are not easily setup with URL tests.
Are there any special configuration in regards to monitor websites using CDN services?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Not sure I understand the question.
I think there is no problem to setup URL test.
But you may want to setup several URL tests, e.g.
- check URL using hostname
- check URL using several IP addresses provided by Cloudflare
- check URL using real IP address of your server
This way you will be sure Cloudflare service works and your web site works fine.

Regards
Alex
steffen
Posts: 3
Joined: Tue Jun 25, 2019 4:14 am

Post by steffen »

KS-Soft wrote:Not sure I understand the question.
I think there is no problem to setup URL test.
But you may want to setup several URL tests, e.g.
- check URL using hostname
- check URL using several IP addresses provided by Cloudflare
- check URL using real IP address of your server
This way you will be sure Cloudflare service works and your web site works fine.

Regards
Alex
Hi Alex,

Thank you for answering and your thoughts of adding additional tests. Your answer seems to be sufficient as I just wanted to hear from you, if any special configuration was needed or known in case of using CDNs.

Digging a little more and I find some WAF events at Cloudflare as follows. After whitelisting the IP address of our monitor, the tests are now passing. I'm not sure how to pass the WAF rule, but it seem like the header needs adjustment of some sort. Do you have any clue?

Code: Select all

{
  "id": "4ec87d54099ad881",
  "country": "DK",
  "ip": "...",
  "protocol": "HTTP/1.1",
  "method": "GET",
  "host": "...",
  "user_agent": "Mozilla/4.0 (compatible; MSIE 6.0)",
  "uri": "/",
  "request_duration": 36999936,
  "triggered_rule_ids": [
    "100043A"
  ],
  "action": "challenge",
  "cloudflare_location": "CPH",
  "occurred_at": "2019-06-25T16:59:01.12Z",
  "rule_detail": [
    {
      "id": "",
      "description": "REQUEST_HEADERS:HOST"
    }
  ],
  "rule_message": "Anomaly:Header:User-Agent",
  "type": "waf",
  "rule_id": "100043A",
  "zone_id": "c73baeafc85f1e0995b4a2a5ec1749fb",
  "cookie": ""
}
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Looks like server (WAF) does not like value set in User-Agent field.
You may change this field on Misc page in HostMonitor Options dialog (Options->Misc->Settings for URL tests).

E.g. set agent name to
Mozilla/5.0 (Windows NT 10.0; Win64; x64)
or
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1
or
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36

Regards
Alex
steffen
Posts: 3
Joined: Tue Jun 25, 2019 4:14 am

Post by steffen »

Thank you very much Alex! :)

Changing the User Agent under the misc options made the URL test pass through Cloudflare.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You are welcome

Regards
Alex
Post Reply