Force Minecraft to use one outbound port to connect to my server
I have a Minecraft server running on a server. It runs on port 25565 and I can connect to it at home.
At school, however (it's a boarding school), due to the port blocking, I can't connect to the server (or any other), this is because only traffic from certain ports can get outside the network. Having talked to the head of IT, he's happy to open a port so that I can connect (we have a very accommodating head of IT) however, after some looking around, I discovered that Minecraft uses a seemingly random port over 50000 to connect to a server.
I was wondering how I could force Minecraft to use one port to connect to the server?
Then I can pass it on to the head of IT, so he can unblock it.
Best Answer
this is because only traffic from certain ports can get outside the network
Are you quite sure? Because if that was how it worked, you would be unable to connect to the Internet. "Random port over 50000" sounds like you're talking about the ephemeral port range.
It is more likely that your school restricts the remote ports that you can access. Your network admin would have to allow outbound traffic to port 25565, or alternatively you could run your server on a port that is already allowed. Port 80's a pretty safe bet.
The local port Minecraft opens on your machine is randomly assigned by the operating system and should not factor into this at all. Pretty much any program that opens a network connection has to open up a random port to receive data.
Pictures about "Force Minecraft to use one outbound port to connect to my server"



How do I connect to a Minecraft server on a different port?
On the Multiplayer screen, click the Add Server button. On the Edit Server Info screen, (1)enter a name you want to call your server in the Server Name textbox. Under (2) Server Address textbox, paste your server's address (IP and port). Once you've completely filled out your server information, click Done.What port should I use for Minecraft server?
You will need to port forward port 25565 to the internal IP address of your server in your router.Do I need to port forward for Minecraft server?
Forwarding a port is necessary if you want to let people who aren't on your Wi-Fi network join a server that you're hosting, as it will allow traffic from outside your network to access your computer.What is port 25565 used for?
Port 25565 DetailsPort(s)ProtocolDetails25565tcpMySQL Standard port Minecraft Dedicated Server (IANA official)25472-25575tcp,udpUnassignedHow To Port Forward A Minecraft Server
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Karolina Grabowska, Karolina Grabowska, Karolina Grabowska, Anete Lusina
