trying to do something tricky with cloudflare tunnels

newguy123

Dabbler
Joined
Jun 5, 2022
Messages
23
i am shipping a truenas scale server to a very non-technical person which i plan on managing remotely. what i want him to do is simply unpack it and plug it into the router. thats it. thats all he is capable of. so i need to be able to access the webgui without any router modifications. enter cloudflare tunnels, which do exactly this.

the problem is, i dont know what ip the router will give the server (i cant use a static IP for the server bc i dont know what address range is being given out by the router and which addresses have already been allocated). now, i know i can use container names in the tunnel for apps. for example, for wireguard, i can use wg-easy.ix-wg-easy.svc.cluster.local:51821 as generated by https://truecharts.org/manual/guides/linking-apps <- this guide and it works! the issue is the webgui isnt an app.

[[also i know the external-services app exists, and ive tried that and it works, but it wants me to specify the ip and port of the service it wants to expose, and i dont know the ip the router will give it]]

how do i point the cloudflare tunnel at port 80 without specifying the private IP?

thanks all.
 
Joined
Dec 29, 2021
Messages
2
for something like this I first installed from charts zerotier and tailscale apps. after configuring them, I could access the WebGui through zerotier or tailscale ip addresses. The thing is that they don't depend on the LAN address of the server, so Truenas was set to DHCP first, and after getting a connection it was set to Static, and then I installed Cloudflared and created a tunnel to the web UI on port 80
Hope this helps you
 

newguy123

Dabbler
Joined
Jun 5, 2022
Messages
23
how does zerotier work? ive never heard of it....
im familiar with tailscale and am trying to avoid that if i can.
 
Joined
Dec 29, 2021
Messages
2
Well, they work almost the same. I like tailscale better, but the free plan only allows 1 route, and Zerotier allows unlimited routes on the free plans.
You create a network, then via cli inside the app you join the network and in the control page you allow the devices to connect to that network and assign IPs. When you install the app you must use host networking so you have access to the web UI via the Zerotier IP address.
This you also can do with Wireguard app if you want, and also with tailscale.
I think they all use Wireguard protocols
 
Top