GCP Firewall And Cloudflare Tunnel Connection Problem

Hello Folks.

I’m using Google Cloud Platform and I installed OpenVpn Server than I completed Cloudflare Tunneling.

Let me explain my problem :slight_smile:

  1. When Tunnel activated I can able to access via subdomain to my server. (0.0.0.0/0 added for GCP Firewall)

  2. Same status and I removed 0.0.0.0/0 and I added Cloudflare Ip’s and I tried to access my server via subdomain, I can’t able to reach server.

  3. I checked where to came request IP to server.

Example Log

2023-06-24T14:40:27+0000 [stdout#info] [WEB] OUT: ‘2023-06-24T14:40:27+0000 [twisted.python.log#info] “34.xx.xx.xx” - - [24/Jun/2023:14:40:27 +0000] “GET /?src=connect HTTP/1.1” 200 4279 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36”’

And I saw 34.xx.xx.xx Ip but I Added this Ip address services side on the tunneling APP.

So I understand problem reason when I request to my subdomain all request coming my service ip.

Example IF I write localhost:943 on the Cloudflare tunnel app I’m seeing ALL request coming localhost its not Cloudflare.

In this situation how can I use GCP Firewall Because I wanna set IP Filter access to Just My home static IP address ?

Thank you.