Why isn't my Minecraft LAN server working? Is it because the zip codes are different? [duplicate]

So I live in a town with 3 different ZIP codes. I'm not sure if ZIP codes have anything to do with Minecraft LAN servers. My problem is that my friend cannot connect to my LAN server. We live at different ends of town so I'm not sure if it is the reason. Could someone explain how the LAN servers work and if it is related to ZIP codes?


Solution 1:

LAN is short for Local Area Network, as in a homenetwork. If you want to set up a LAN server over internet you need to use a virtual LAN network like Hamachi can provide.

Setting it up is quite easy, just have everyone join the same hamachi network (up to five people on free hamachi) and let them connect to the hamachi IP of the hoster (hamachi IP's begin with a five so 5.x.x.x where the x's can be anything from 0 to 255).

Solution 2:

LAN can only work when you are connected to the same network, as said above