mc server via tunnels

trying to run a mc server. it runs fine locally, but putting it on a tunnel will give me this error. now sure what's wrong because cloudflare claims it's healthy
No description
No description
26 Replies
Chaika
Chaika6mo ago
how are you trying to connect? You can't just use the public hostname if that's what you're trying ?tunnel-tcp
Flare
Flare6mo ago
Cloudflare Tunnels use Cloudflare's proxy, which only supports proxying HTTP Traffic. If you want to use non-http applications over your tunnel, Cloudflare has a few other options: For a few specific protocols such as SSH, RDP, and SMB, Cloudflare has guides for them here: https://developers.cloudflare.com/cloudflare-one/applications/non-http/ For Arbitrary TCP like Minecraft, MySQL, and any other tcp application, Cloudflare has a guide here: https://developers.cloudflare.com/cloudflare-one/applications/non-http/arbitrary-tcp/ For Arbitrary UDP like Minecraft Bedrock, SMTP, and any other udp application, you will need to use Private Networking with WARP: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/private-net/connect-private-networks/ Please note for all of these except SSH and VNC which can be browser-rendered, you will either need to use cloudflared (Cloudflare's tunnel daemon) on the client machine running in the background or Private Networking with WARP, and have WARP installed on the client machine logged into your Zero Trust Team.
Chaika
Chaika6mo ago
(tldr, each client has to install/run cloudflared or warp, could work for private servers though)
Pyx
PyxOP6mo ago
so do they all just need to have cloudflared running? they all dont have cf accounts with sites
Chaika
Chaika6mo ago
yes, running in the background whenever they'd want to play they don't need cf accounts, but they would need to pass whatever access policy you setup (email totp, some other auth provider, etc)
Pyx
PyxOP6mo ago
noted ill get back to you when i figure it out
Pyx
PyxOP6mo ago
i have cloudflared running and it still does not connect
No description
Pyx
PyxOP6mo ago
i feel like im missing something super clear here
Chaika
Chaika6mo ago
yea, the guide I linked goes over the exact command to run and such
Pyx
PyxOP6mo ago
oh i need to run the connect
Pyx
PyxOP6mo ago
i thought minecraft would just do that
Chaika
Chaika6mo ago
you need a public hostname with tcp service pointing to the mc server, and then run cloudflared access tcp --hostname tcp.site.com --url localhost:25565, and on mc you'd want to connect via localhost:25565 (replace tcp.site.com with your public hostname) oop and you need to create an access policy for the public hostname too, that guide mentions that
Pyx
PyxOP6mo ago
seems to be working with all of that, thanks
Chaika
Chaika6mo ago
nice! yea it's a bit confusing, would be nice if the zt team made a guide just for mc one day
Pyx
PyxOP6mo ago
sorry for the ping @Chaika but do you know why one of my friends is seeing this
No description
Chaika
Chaika6mo ago
would have to show more context/entire output, looks like the hostname he specified in the access tcp command is wrong. If he's trying to connect to your mc server same as you, make sure he used the exact same command
Pyx
PyxOP6mo ago
oh good point he added https:// lmao thanks wait no nevermind he didnt the output is
Pyx
PyxOP6mo ago
No description
Pyx
PyxOP6mo ago
im running the exact same one and it woreks fine and anothwer one of my friends is
Chaika
Chaika6mo ago
that error is cloudflared saying "I tried to establish a websocket connection to minecraft.darkpixlz.com and I got this: " was that same subdomain unproxied before or didn't exist at one point? Could just be DNS Cache
Pyx
PyxOP6mo ago
it didnt exist until tonight i could ask him to flush his dns
Chaika
Chaika6mo ago
hmm yea that's a very specific error too, could be firewall restrictions/restricted network stuff. You might want to add an access policy to that hostname restricting access btw (or delete that screenshot for now). Just as a sanity test I tried on my end, and it established fine. So something more local/specific
No description
Pyx
PyxOP6mo ago
yep will be adding an allowlist tomorrow also he said flushing dns did not help and he reinstalled cloudflared
Chaika
Chaika6mo ago
if he visits <the public hostname url directly> directly in his browser, does he see anything other then a blank page?
Pyx
PyxOP6mo ago
his vpn is working for now but i'll update here if something else goes wrong also fyi whitelist enabled just now incase anybody else had any ideas
Want results from more Discord servers?
Add your server