Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Lan Multiplayer Ports

server port router forwarding

  • Please log in to reply
24 replies to this topic

#1

rodier
    rodier

    Tree Puncher

  • Members
  • 17 posts

Posted 09 August 2012 - 02:40 AM

Every time I run minecraft lan game, port is different.  That is OK for LAN games, but for Internet games OR for lan games with routers,  this means mess with router and port fowarding every time.

So my suggestion is - when player is creating world, he can SET which port will be used.  So it will be possible to set it to 1 port everytime, so we dont need to change it every game.

+ for someone who is hosting different worlds for different group of players, it will be cool too.
Example:
monday  - group 1,  world 1, port 65001  so I will give my friends IP:65001
tusday - group 2, world 2, port 65002 ...etc

so everytime I run minecraft, I just choose world and tell my friends to connect and they will connect to right world, because right port will be open.

thanks for your time :)

Register or log in to remove.

#2

Ampera123
  • Location: Behind You with a knife
  • Minecraft: Ampera123456

Posted 25 August 2012 - 08:44 PM

Uhhhh What?

#3

Prince_Deity
    Prince_Deity

    Prince of Darkness

  • Sectional Moderator
  • 2105 posts
  • Location: Scattered throughout spacetime.
  • Minecraft: Justin_B

Posted 25 August 2012 - 09:09 PM

I believe the default port is like, 25565 EVERY time, so I have no idea what you are talking about.

#4

Veovis Muad'dib

Posted 01 September 2012 - 02:16 PM

View PostPrince_Deity, on 25 August 2012 - 09:09 PM, said:

I believe the default port is like, 25565 EVERY time, so I have no idea what you are talking about.
The suggestion is for a way to specify the port used when hosting a "LAN" game.
I do stuff.

Ages of Mystcraft - Symbols released!  New symbols for Mystcraft!
Now working on Ages of Mystcraft - Tech and Ages of Mystcraft - Journals.

#5

Klausar
    Klausar

    Diamond Miner

  • Members
  • 729 posts
  • Location: Germany
  • Minecraft: Klausar

Posted 01 September 2012 - 02:22 PM

If you want to play over the internet I can't see your point. Since you said for LAN it's okay. Once you forwarded your port you can use it forever. But you can try using Hamachi if that solves your problem.

Btw. you can change the Port in the server.properties file.

#6

FattyMieo
  • Location: Malaysia
  • Minecraft: mrsagency

Posted 16 September 2012 - 09:53 AM

I think he is trying to tell about the "Open to LAN" function cannot change the server port.
I experienced the same problem too, it is impossible to portfoward all those ports as they change every time when you using "Open to LAN"
P/S: I love creeper! Posted Image (Because I am a cat!)

#7

pwajnkaim

Posted 16 September 2012 - 10:21 AM

Why not just let lan have the default port and change the port for all the other servers.
Posted Image

#8

masrho
    masrho

    Coal Miner

  • Members
  • 101 posts
  • Location: in the shadows...
  • Minecraft: masrho

Posted 12 November 2012 - 09:12 PM

What he's trying to say is on a LAN server that you open from SP the port is randomized every time you load your game and since its meant for LAN it doesn't pose a problem at home.

However he is trying to forward the LAN port so others can play on his SP world w/o messing with all the server software that comes with a dedicated server and seeing as the port for a LAN game is random every time he has to forward a different port every time he wants to play with friends on his SP world.

I am trying to mod the way minecraft determines which port to use for LAN so I can "fix" this "problem" but have so far run into dead ends, if anyone knows where to look any help would be greatly appreciated.

View Postrodier, on 09 August 2012 - 02:40 AM, said:

So my suggestion is - when player is creating world, he can SET which port will be used.  So it will be possible to set it to 1 port everytime, so we dont need to change it every game.

+ for someone who is hosting different worlds for different group of players, it will be cool too.
Example:
monday  - group 1,  world 1, port 65001  so I will give my friends IP:65001
tusday - group 2, world 2, port 65002 ...etc

also rodier I really like your idea of per world ports but I think that s unnecessary, if you have your port opened for LAN use only then minecraft will know if the world is open for MP use or not regardless or which world is used.

correct me if I didn't understand what you meant correctly
Among other things  
PlayWarframe =>this game looks awesome and is being developed by a star trek dev!

#9

7eggert
    7eggert

    Gold Miner

  • Curse Premium
  • Curse Premium
  • 434 posts

Posted 12 November 2012 - 10:24 PM

View Postmasrho, on 12 November 2012 - 09:12 PM, said:

I am trying to mod the way minecraft determines which port to use for LAN so I can "fix" this "problem" but have so far run into dead ends, if anyone knows where to look any help would be greatly appreciated.

Look for a call to bind() or usage of ServerSocket(port, ...)

HTH

#10

masrho
    masrho

    Coal Miner

  • Members
  • 101 posts
  • Location: in the shadows...
  • Minecraft: masrho

Posted 12 November 2012 - 10:58 PM

View Post7eggert, on 12 November 2012 - 10:24 PM, said:

Look for a call to bind() or usage of ServerSocket(port, ...)

HTH

oh thank you that narrows my search down a ton
Among other things  
PlayWarframe =>this game looks awesome and is being developed by a star trek dev!

#11

Zukaro
    Zukaro

    Redstone Miner

  • Members
  • 509 posts
  • Location: Canada
  • Minecraft: Zukaro

Posted 13 November 2012 - 03:55 AM

View Postrodier, on 09 August 2012 - 02:40 AM, said:

Every time I run minecraft lan game, port is different.  That is OK for LAN games, but for Internet games OR for lan games with routers,  this means mess with router and port fowarding every time.

So my suggestion is - when player is creating world, he can SET which port will be used.  So it will be possible to set it to 1 port everytime, so we dont need to change it every game.

+ for someone who is hosting different worlds for different group of players, it will be cool too.
Example:
monday  - group 1,  world 1, port 65001  so I will give my friends IP:65001
tusday - group 2, world 2, port 65002 ...etc

so everytime I run minecraft, I just choose world and tell my friends to connect and they will connect to right world, because right port will be open.

thanks for your time Posted Image


He's getting IP addresses confused with ports (I know what he put aren't IP addresses, but it's the only explination for him having to enter something different everytime he wants to allow friends to connect).

The port doesn't change, however, the IP address does.  If you want your IP address to stay the same you're going to have to set that on your computer, as your computer is what gets the IP address, not Minecraft.  Most computers use dynamic IP addresses (this is the default; the IP addresses are handed out by a DHCP server (your router has one and will by default be using it)).  If you want to change this take your computer off DHCP and give it a static IP address.  You can Google how to do that.

You don't need to worry about your ports unless trying to play over the Internet (in which case you need to use a VPN (such as Hamachi) or forward your ports).  Your ports won't change however.  But your IP address will change if it's set to DHCP, so set that to static and you'll be good to go (as long as you enter a proper IP address).

If your router's IP address is 192.168.1.1 then make your computer's IP address static as 192.168.1.100 (generally DHCP hands out IP addresses in the range of 2-50 and wont go higher than that; it's better to keep static IP addresses out of the DHCP range).  Then set your subnet mask to 255.255.255.0 (if you're using the defaults, which you likely are).  Then for the domain name server set it to 8.8.8.8 and 8.8.4.4 (that's Google's DNS servers); if you don't do this part people should still be able to connect to you but you wont be able to connect to websites using domain names (you'll have to use their IP addresses instead).

Zukaro Travon

Robotic Fox

Posted Image


#12

masrho
    masrho

    Coal Miner

  • Members
  • 101 posts
  • Location: in the shadows...
  • Minecraft: masrho

Posted 14 November 2012 - 07:55 AM

View PostZukaro, on 13 November 2012 - 03:55 AM, said:

He's getting IP addresses confused with ports (I know what he put aren't IP addresses, but it's the only explination for him having to enter something different everytime he wants to allow friends to connect).

actually it has nothing to do with his ip. the way minecraft LAN is setup makes it so a random free port is chosen every time the game launches rendering the last port he opened on his router useless so he has to go and setup the new port displayed in the current open game.

and by all means am I not disregarding that DHCP does cause an ip change its just that unfortunately this is a function of the game itself so it is a bit harder to fix
Among other things  
PlayWarframe =>this game looks awesome and is being developed by a star trek dev!

#13

Zukaro
    Zukaro

    Redstone Miner

  • Members
  • 509 posts
  • Location: Canada
  • Minecraft: Zukaro

Posted 14 November 2012 - 04:31 PM

View Postmasrho, on 14 November 2012 - 07:55 AM, said:

actually it has nothing to do with his ip. the way minecraft LAN is setup makes it so a random free port is chosen every time the game launches rendering the last port he opened on his router useless so he has to go and setup the new port displayed in the current open game.

and by all means am I not disregarding that DHCP does cause an ip change its just that unfortunately this is a function of the game itself so it is a bit harder to fix

Oh :P
I didn't know Minecraft randomly chose ports, I assumed it'd use the default (since that's what normal servers use) and if that was taken switch to another port.  I'm guessing the creators of Minecraft assumed people would only play LAN matches on the LAN (rather than over the Internet).

Something you could always do is just run the server software when you wanna play multiplayer (although that can be a pain and also slow down your computer).  Or you could just put your computer behind a DMZ, the problem with that is it allows all connections (as in, all ports are open) which can be a security issue if your computer doesn't have a good firewall.  I don't know how Minecraft LAN works however as I've never used it (I've only used the server software for playing multiplayer), so you might still have the problem as your friend would still need to be told the port number so he/she can put that in along with the IP address to join (but you wouldn't have to forward anymore ports).

Zukaro Travon

Robotic Fox

Posted Image


#14

Krzysiozaur

Posted 21 November 2012 - 10:04 AM

What is more curious - every time generated LAN port for a net game makes option of permanent setting up external server (via Multiplayer -> Add Server) a total waste of time. How can you set up a server as you're obliged to change its setting everytime an external LAN game is opened.

The obvious resolve would be an option for setting up permanent port number for LAN/internet game. Having this port set for 0 or nil on the start (and thereby having the player to choose the number himself) would also limit the security problem (as creating a default port usually opened by the typical Minecraft player).

#15

CptHunter
  • Location: United States
  • Minecraft: Xxzistance

Posted 22 November 2012 - 02:47 PM

Made a mod that does the same, check it out! :)
Posted Image

#16

Khormin
    Khormin

    Stone Miner

  • Members
  • 76 posts
  • Location: Online
  • Minecraft: Zenithas

Posted 14 March 2013 - 08:39 AM

Tried the mod.  Killed my LAN server and corrupted the world.  Then no support when submitted a bug report.  Any other takers?

#17

Hunter
    Hunter

    Retired Staff

  • Retired Staff
  • 1769 posts
  • Location: New Zealand
  • Minecraft: hunterman12345
  • Xbox:flashbang007

Posted 14 March 2013 - 09:01 AM

Wouldn't this defeat the purpose of LAN?

LAN is suppose to be a game locally and was not intended to be outside the network. Any Minecraft within the network can join the LAN game regardless of the port.

If you really wanted to join a friend's world, just use the normal server software and specify the port you want, like it was intended to.
Posted Image

Want a Quality Minecraft Server? Check out DemonVPS Minecraft Host!


#18

maff271
    maff271

    Tree Puncher

  • Members
  • 13 posts

Posted 20 March 2013 - 07:35 PM

Thanks, this works! :) i'm using this to record a series on a Galacticraft world, but the server doesn't work ATM and it's annoying having them sit right next to me AND be in a skype call for their voice to pick up properly! have this! Posted Image

#19

KirkEBarrett

Posted 26 March 2013 - 01:09 AM

I'm having the same issue - if you load a bunch of mods for a single player environment, and want to open to lan, but your friend is not in the same network, you need a static port #.  

Yes, IP# can change, not that often.  The random port# is killer.

Here is the nasty way to do it:
Go to your ROUTER, and set the default port - NAT default host - to the internal IP# of your machine.  Say, 10.1.0.6.   Now, all incoming traffic comes to your machine.  WOW.  What a bad idea!

Then, you have to go into WINDOWS FIREWALL SETTINGS and click the properties and TURN OFF THE WINDOWS FIREWALL FOR ALL 3 networks.  Click apply.  OMG - Can this get worse?

Start the minecraft, open the world.  Share it to lan.  Write down the numbers:
10.1.0.6:57004

Now, go to ipmonkey.com and get the public IP Address of your machine.  get back 64.123.123.1  

Now, tell your friend to Add A server to:   64.123.123.1:57004

Everytime you open your lan, you get a new PORT #.  Just tell the friend to go to your public ip number : the new pORT#.  Everytime.  Not a hassle if you are skyping.

Now, to make this a  LITTLE safer, go back to Windows Firewall Advanced Settings.   Turn on all 3 firewalls domains.   Click apply.
Now go create an INCOMING RULE.   do a custom port.  Enter a range:  40000-65530   for TCP and UDP.   Make sure to check boxes to allow
Do the same for OUTGOING.  Make a custom port range.  make sure it is set to allow.

Run game as directed above, give out port Number.  If it is in the 40000-65530 port range, it will work.

If you ROUTER lets you assign ranges to forward, do the same thing at the router as a port forward INSTEAD of as a NAT default host.   The NAT default HOST is NASTY BUSINESS.  Owch.  You will get all the ip traffic poking at your public IP.  Nasty.

But it works like a charm!   Also - make sure that BOTH PEOPLE on each side of the LAN have the same set of mods!   If you are sharing a Mo' Creatures  mod base, you need all the same mods on the friends side to have the open lan work.  But she does!

#20

Seikojin
    Seikojin

    Zombie Killer

  • Members
  • 206 posts

Posted 17 September 2013 - 05:59 AM

I am double routered and have a issue with forwarding.  Basically my network is cable modem --- Router 1 (3 wired machines) 4th output ===> Router 2 (2 wired machines).  I open some ports, however I am unable to get minecraft single player lan to not only use those ports, but advertise on them so the others in the house can see.