How can i deny direct ip connections with error "Direct IP access not allowed" "Error 1003"

Heya, i saw this thing on another website when i try to connect directly to ip on website and it anwsers with an error “Direct IP access not allowed” otherwise known as Error 1003. How can i make the same with with my website?

Welcome to the Cloudflare Community. :logodrop:

That is automatic for any website using the Cloudflare Proxy. Error 1003 is returned when a request is sent to the Cloudflare Proxy and lacks a Host header.

1 Like

Weird enough i do have cloudflare proxy and yet it still wont do anything about it, maybe i need to make some-sort-of tunnel?

What won’t do anything about what?

What are you doing?

What do you expect to see?

What do you see instead?

1 Like

Im just asking how can i turn on something in cloudflare so that no one could connect directly to my ip address

That is not the same as Error 1003 that you originally asked about.

Have you considered configuring your server’s firewall to only allow access from Cloudflare IPs?

Make sure that you do not firewall yourself out of management access!

2 Likes

Free plans — Protect your origin server · Cloudflare Fundamentals docs.

2 Likes

I meant something like this: 104.26.3.165
That is the example website

image

As @epic.network stated this happens by default. On an HTTPS connection it is simply a an SSL error because nothing is listening on that Ip with a matching cert.

1 Like

Oh wait, its a forced certificate check to make sure that only cloudflare is getting the data?

A given IP address can proxy millions of websites. Direct access to the IP address to the Cloudflare HTTP proxy edge absent a host header provides no information to access an origin.

Behavior varies for other specific services beyond simple HTTP/S but those use other IP ranges and are out of scope vis a vis this specific scenario.

2 Likes

Thank you so much :]

3 Likes

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