-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tailscale with MQTT? #68
Comments
I cannot answer that question as I've no experience with Tailscale. If it is an HTTP-only proxy then it will not work. MQTT is a distinct protocol. You would please need to consult the Tailscale documentation. |
Looks like Tailscale supports MQTT, I've tried multiple configurations afore mentioned: [tailscale-ip]/owntracks, with both MQTT mode and HTTP configuration for friends neither worked. So I tried just seeing if it would work on local network instead. [pi-ip]/owntracks with MQTT mode or HTTP mode was also gave connection errors for both configurations as well.
Error logs for MQTT mode
Are these issues due to using an IP as opposed to a full domain? |
I see an Do yourself a favor while attempting to set up and configure the Tailscale connection:
If I were you I would first ensure everything works seamlessly on my local network, and later add the Tailscale ontop of that. On the other hand: do you really require the VPN? We configure the MQTT broker (and the Web interface) to use TLS by default if you configure an email address in Is that not sufficient for your requirements? |
I'm using tailscale for 2 reasons
|
I've also run through my ufw settings and all the ports that it was throwing errors for are open |
No, absolutely not. You are obfuscating port numbers so it's difficult to know what you're actually attempting. (Obfuscating IP addresses is fine, obviously.) In theory, (I repeat: theory as I've never used Tailscale), you have a VPN on your mobile, and instruct our app to connect to a specific port which will exit on the VPN endpoint (your home?) and there be connected to the MQTT broker (Mosquitto). I assume the ECONNREFUSED is being handed up by Tailscale to our app. Note also, that MQTT uses TCP/1883 for unencrypted traffic (which is fine in your case as you're protecting with a VPN) and TCP/8883 for TLS traffic (default ports). Note also, that we configure Mosquitto (via bootstrap.sh) to listen to port 1883 only on the loopback interface; you'll see this in: $ sudo grep 1883 /etc/mosquitto/conf.d/owntracks.conf
# -- 1883 ----- Plain (loopback only)
listener 1883 127.0.0.1 You can change this, obviously, and restart Mosquitto, but be aware the config will be reset whenever you rerun Depending on which address/port Tailscale is attempting to hand the connection off to on the endpoint, this might be the issue. |
On my previous http setup I was able to have an owntracks container running on my pi and access the its service by pinging its tailscale ip while my VPN was on.
I've gone through the quicksetup and set my tailscale ip as dns_domain and then run the boostrap script. From here I can access the service at [tailscaleip]/owntracks from both my phone and computer to download the configurations.
However, after this I am unable to push any updates to the MQTT broker as it will refuse the connection. Is there a way to get this approach working with MQTT or is it not possible?
The text was updated successfully, but these errors were encountered: