CloudFlared (CloudFlare Zero Trust) with Docker and iptables

Viewed 15

I'am making a CloudFlare Zero Trust connection as cloudflared in Debian 11 linux server. Everything is working, where firewall is disabled.

When user go to xx.yyy.com is redirecting to log in with CloudFlare Access, then (when access is granted) user can see log in option of Portainer. Portainer is in the docker container, and Portainer ports are on loopback interface.

"127.0.0.2:8000->8000/tcp"
"127.0.0.2:9443->9443/tcp"

I have a problem when I'm turning on the iptables firewall with INPUT, FORWARD and OUTPUT rules for DROP, even if I have:

iptables -A INPUT -i lo -j ACCEPT

The error is: "error="Unable to reach the origin service."

Of course, common iptables rules are used and CloudFlare IP addresses (and zero trust addresses) are white-listed.

Could anybody help me, please? :D

Have a wonderful day!

0 Answers
Related