Cloudflare offers cloudflared as a Docker container, this saves the hassle of having to manually install the tunnel service and streamlines the update process.
Using generative AI is discouraged in this community, see also: Want to help others? Leave your AI at the door
Instead have a look at this guide if you want to learn about setting up a basic iptables firewall: Simple stateful firewall - ArchWiki
Note that cloudflared only initiates outbound connections to both Cloudflare and your local network, so I’m not sure what you’re trying to achieve by allowing connections from the public Cloudflare IP addresses in your INPUT chain.