Replies: 1 comment 3 replies
-
Did you restart Home Assistant after configuring the trusted proxy settings? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
400: Bad Request.
What have I done wrong?
Any suggestions. Many thanks in advance.
I have followed all the instructions. All of the install went well. Created a new domain name example.com, Used that domain name in the config. Tunnel looks great on the Cloudflare side and no errors in the logs on the HA side. Logs say successfully connected to tunnel. Everything looks fine. Just returns 400 when I want to access the domain name from the outside world.
I have added this to the yaml as instructed:
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
In the HA Cloudflare add on configuration for External Hone Assistant Hostname I put in the new example.com domain name. Is this correct?
When testing in the browser I have tried example.com and also example.com:8123
IS there anything I need to do with ports?
When I receive 400 I see nothing in the Add On logs. No error. But no success either.
I have a 4g router, with the usual CGNAT issies, so that is why I have gone down this cloudflare path.
Here are the logs with private info xxxxxxxx
Log level is set to INFO
[22:51:02] INFO: Checking add-on config...
[22:51:03] INFO: Checking for existing certificate...
[22:51:03] INFO: Existing certificate found
[22:51:03] INFO: Checking for existing tunnel...
[22:51:03] INFO: Existing tunnel with ID xxxxxxxxx found
[22:51:03] INFO: Checking if existing tunnel matches name given in config
[22:51:09] INFO: Existing Cloudflare Tunnel name matches config, proceeding with existing tunnel file
[22:51:09] INFO: Creating config file...
[22:51:11] INFO: Validating config file...
Validating rules from /tmp/config.json
OK
[22:51:12] INFO: Creating DNS entry xxxxxxxx.com...
2023-03-29T20:51:13Z INF xxxxxx.com is already configured to route to your tunnel tunnelID=xxxxxxxxxxx
[22:51:13] INFO: Finished setting up the Cloudflare Tunnel
[22:51:13] INFO: Connecting Cloudflare Tunnel...
2023-03-29T20:51:14Z INF Starting tunnel tunnelID=xxxxxxxxxxxxxx
2023-03-29T20:51:14Z INF Version 2023.3.1
2023-03-29T20:51:14Z INF GOOS: linux, GOVersion: go1.19.3, GoArch: arm64
2023-03-29T20:51:14Z INF Settings: map[config:/tmp/config.json cred-file:/data/tunnel.json credentials-file:/data/tunnel.json loglevel:info metrics:0.0.0.0:36500 no-autoupdate:true origincert:/data/cert.pem]
2023-03-29T20:51:14Z INF Generated Connector ID: xxxxxxxxx-5aa8-4513-bce4-e63cc0c51164
2023-03-29T20:51:14Z INF Initial protocol quic
2023-03-29T20:51:14Z INF ICMP proxy will use 172.30.33.0 as source for IPv4
2023-03-29T20:51:14Z INF ICMP proxy will use :: as source for IPv6
2023-03-29T20:51:14Z INF Starting metrics server on [::]:36500/metrics
2023-03-29T20:51:14Z INF Connection xxxxxxxxx-4708-ac6c-4dd48c737734 registered with protocol: quic connIndex=0 ip=198.41.192.167 location=BCN
2023-03-29T20:51:15Z INF Connection xxxxxxxxx-68a8-4b0e-96a1-ecad327a7aad registered with protocol: quic connIndex=1 ip=198.41.200.193 location=MAD
2023-03-29T20:51:15Z INF Connection xxxxxxxxx-4e1d-4c94-a207-91ad6bd532bf registered with protocol: quic connIndex=2 ip=198.41.200.13 location=MRS
2023-03-29T20:51:17Z INF Connection xxxxxxxxx-ec30-4d13-8b4d-b471428d9d19 registered with protocol: quic connIndex=3 ip=198.41.192.7 location=BCN
Beta Was this translation helpful? Give feedback.
All reactions