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.
1 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.
7