how to run my minecraft server through tunnels

how do I setup tunnels to allow my player to join on ip:25565 and ip:19132
44 Replies
Chaika
Chaika9mo ago
?tunnel-tcp
Flare
Flare9mo 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
Chaika9mo ago
Players will need to install and run some software to connect, either cloudflared or WARP with Private Networking. They cannot simply connect to your hostname/through the tunnel without running software on their PC.
Voids
VoidsOP9mo ago
it is running on my server the issue is that when I put the ip and a subdomain the tcp connection does not work
Chaika
Chaika9mo ago
I would read my message again Players need to install and run software, not just the server
Voids
VoidsOP9mo ago
players cant do that is there way to foward it through cname records?
Chaika
Chaika9mo ago
then you can't really use tunnels for what you want. CF has Spectrum (proxying TCP in general) but it's expensive $1/gb and only Pro has it for Minecraft, and there's no integration with Tunnels, would need to port forward/static ip.
Voids
VoidsOP9mo ago
so then cname seems like the only option I just dont know how to do it for 2 seperate ports on the same sub domain would I need seperate ones?
Chaika
Chaika9mo ago
You can't CNAME down a tunnel, if that's what you're asking
Voids
VoidsOP9mo ago
Im not gonna do that Im gonna have the cname point to my public ip
Chaika
Chaika9mo ago
why do you want two ports? One for bedrock, one for java?
Voids
VoidsOP9mo ago
yes
Chaika
Chaika9mo ago
why do you think you need a cname over a normal a record?
Voids
VoidsOP9mo ago
oh nvm Im dumb I meant A record
Chaika
Chaika9mo ago
if it's a unproxied dns record, and you have port forwarding/firewall set up right, both ports will just work no cf ddos protection though
Voids
VoidsOP9mo ago
I mean my firewall isnt the best but its up and port fowarding is on
Chaika
Chaika9mo ago
if you're on a home ISP, you'd just get easily knocked down by pure saturation rather then a more specific attack but yea it's something
Voids
VoidsOP9mo ago
I just dont know how to setup one a record for both ports is that possible
Chaika
Chaika9mo ago
A records don't care about ports you just point them towards an IP they connect IP: port the user/program specified the only issue is if your firewall/port forwarding are setup for it
Voids
VoidsOP9mo ago
they are is the name tab for a sub domain?
Chaika
Chaika9mo ago
if you just specify the subdomain there, it'll assume/display/auto append your domain name yea
Voids
VoidsOP9mo ago
hmmm I cant add the port under ipv4 adress
Chaika
Chaika9mo ago
Right, A records don't care about ports you don't specify the port there just the IPv4
Voids
VoidsOP9mo ago
so can I use 2 different ports on the same sub or would I need 2 subs?
Chaika
Chaika9mo ago
Same subdomain When you type mc.mysite.com into MC, it goes and resolves the A record, and then it tries connecting on the default port
Voids
VoidsOP9mo ago
but bedrock dosent use the default port bedrocks default port is 19132
Chaika
Chaika9mo ago
ok and as long as your server uses that default port/fw/port forwarding/it'd work if you use a diff one then the default for bedrock the users would need to specify it. Java supports SRV records which can use diff ports, but bedrock doesn't afaik
Voids
VoidsOP9mo ago
yea it wont load on bedrock in the specified port slot I put the port java is working tho I have to have proxy off right? idk where iM going wrong here
Chaika
Chaika9mo ago
port forwarding/fw probably try connecting to the ip directly
Voids
VoidsOP9mo ago
hmmm it works fine on the ip directly can I enable proxy at all? if I do need a subdomain to point towards a port how can I do that
Chaika
Chaika9mo ago
no, proxy only supports http that's interesting though, could be device dns cache if it was ever proxied/pointed at something in the past
Voids
VoidsOP9mo ago
it worked on my pc right away but took time on my phone its really weird
Chaika
Chaika9mo ago
in a wider dns sense, dns does not care about ports at all. Some specific applications like Minecraft support SRV records which allow specifying a specific port, or CF Proxied Records can be overriden to connect to a specific port for http requests sounds like local dns cache, each device has one, plus your recursive resolver
Voids
VoidsOP9mo ago
well I mananged to setup both the ip and map but there on seperate subdomains minecraft.versioncontrol.tech and map.versioncontrol.tech
Chaika
Chaika9mo ago
one is proxied, one isn't
Voids
VoidsOP9mo ago
yea is there a way to mask the ip of the other one?
Chaika
Chaika9mo ago
of the one directly to your mc server?
Voids
VoidsOP9mo ago
yea the other one is proxied through a tunnel
Chaika
Chaika9mo ago
CF has a product for proxying TCP connections called Spectrum, which supports Minecraft, but you need Pro and it costs $1/gb, it's just really expensive. There are other options for proxying MC through "tunnel" like setups like https://playit.gg/ which I've heard decent things about, never tried myself though. or TCPshield
Voids
VoidsOP9mo ago
I wanna hide it but play it gg makes the url really bad and tcpshield is confusing af
Chaika
Chaika9mo ago
I think tcpshield has bedrock behind paid tier anyway playit has some paid tier where you can use custom domains I think, maybe worth looking into
Voids
VoidsOP9mo ago
I dont wanna pay at all its monthly might save up for a better network firewall
Chaika
Chaika9mo ago
can't have everything for free lol, CF is an exception with how big its free tier is, but still fairly limited when it comes to some products
Voids
VoidsOP9mo ago
as a highschool student its really hard to pay monthly for things so If I had a job I would get it but I dont wanna pay for something that I dont profit from enough ok I found an issue with my config map stopped working and idk why
Want results from more Discord servers?
Add your server