Hello, I have installed BTCPay Server on a linux machine and I’m trying to expose it to clearnet using a tunnel. On the linux machine if I do curl -I 127.0.0.1:80 I got the response and all is OK. Also accessing from the browser to the machine IP I can see the app running.
The problem is when using the tunnel (cloudflared docker). The response I get is:
ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:80: connect: connection refused" cfRay=71fc98ef1e7b76fc-LHR ingressRule=0 originService=https://127.0.0.1:80
ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:80: connect: connection refused" connIndex=3 dest=https://testpay.mydomain.es/ type=http
Try using 0.0.0.0:80 instead of 127.0.0.1:80
Also check if your server is blocking any IP from Cloudflare
Or change the IP to the real IP of your server? You cannot access the Internet using the address of iana private ip ranger
@ndbiaw have tested with 0.0.0.0:80 and the same happens…
@cscharff I have placed the local IP of the server 192.168.1.49:80 and it works, can you please explain me why? I think this will be related with the docker networking, maybe before, when I was using 127.0.0.1:80 this was calling the internal docker intense and not the machine where the instance was running.
@ndbiaw yes it is solved, but I wanted to understand why and how it works, can you please explain or share some resources?
The tunnel created on the container can dial any IP of my local network like if was a machine inside my local LAN? The container works as an independent machine inside my server?
The answer may not be correct and it should not be used as a reference.
It’s probably because your network isn’t actually running locally on your server. When you access 127.0…, it will not access your modem but will access it locally in your computer. 0.0.0.0 is similar to 127.0… but it includes the entire local IP on your machine (for example if you distribute 2 websites with 2 IP addresses 127.0.0.1 and 127.0.0.2 then 0.0.0.0 is reachable both websites if both have different port.
And maybe in this case it was calling 127.0… on your modem, which doesn’t really have any service so you can’t connect. When you use 198.0…, you can access because your modem knows that 198.0… is the local IP of the servers in the LAN.