I have an on-prem server that needs to send its requests to a URL with a fixed external ip address, since there is a requirement on a strict outbound rules.
When Cloudflare assign domain name to an external ip address, can we assume that it will never change?
Anything proxied will, obviously, not be advertised with the configured address but with the proxy one. The proxies will then send the request to the origin.
If you are referring to any such URLs in your HTML documents, then no, Cloudflare won’t change that.
example is a Cloudflare managed domain Proxied to an ALB. Obviously, example domain is bind to an IP address.
Now, external server needs to access the example
In order to do that, an outbound static policy should be applied on the external server to allow an outbound call to the example with a fixed IP.
The question here if this assigned IP is static and can be safely configured on the local FW rules (unfortunately, configuring the rule by the DNS name on the outbound is not an option).
Later on this will be applied on the external server /etc/hosts to instruct the server that the example “resolves” to an IP
Mainly we want to avoid changing the hosts file or FW policy.
No, I am afraid, the assigned proxy addresses are not static but will change.
There may be some workarounds but none of them are official and they may stop working at any time. The only “authoritative” address is the one which is resolved by the nameservers assigned to your domain, and that address will change.
If you sign up for an Enterprise plan, things are of course different.