Use Hamachi. You'll be able to create a virtual LAN that everyone can connect to over the internet using a LAN name and password.
To set it up, download and install the (free) unmanaged version of Hamachi on each computer you'd like to connect. On one of the computers, create a new network in Hamachi by clicking
Network -> Create a new network... and you'll be able to set up your virtual LAN.
On the other computer(s), connect to the network via Hamachi by clicking
Network -> Join an Existing Network. Type in the network name and password to connect. You'll now each be able to see the other's computer name in the list of peers on the Hamachi interface.
Hamachi will also give you both a unique IP address. This is the IP address you will use to connect.
Now you're connected and Hamachi is set up (there are some optional advanced things you can do depending on how people will be connecting, but let's keep it simple).
Select one of the computers to host the game. Turn on Minecraft and create or open a map in singleplayer, and start playing. While in the game press escape. In the escape menu there is an option for
Open to LAN.
Click it, choose the basic settings for your LAN world, then click
Start LAN World.
Minecraft will tell you that it's hosting the game on a specific port. Write that port down because your friend(s) will need it to connect to you. If the text disappears before you have a chance to write it down you can press enter to open the recent chat/console history.
Now you just need to get your friends to connect to you. In the main menu of Minecraft on connecting clients click
Multiplayer then click
Direct Connect. People need two things to connect to you: an IP address, and a port. Use the host computer's Hamachi IP address, and the host computer's Minecraft port in that order separated by a colon. So if your Hamachi IP is 220.127.116.11 and Minecraft told you it's hosting the game on port 51116, then you should have your friend(s) type in 18.104.22.168:51116 as the server address and hit join.
That should work... But in case you run into some trouble, here are some troubleshooting steps:
- Make sure you can both see each other as connected in Hamachi. If you can't then it probably means something is being blocked. There are a broad number of things that can cause this (ranging from weird OS configurations to disconnected network cables) so it's outside of the scope of this question.
- If Hamachi is giving you the green and you still can't connect, make sure everyone is typing in the correct IP address and port again, before you before wasting time on more advanced troubleshooting.
- Hamachi bypasses your router via a VPN so if it says your connected, it's unlikely your router's configuration is blocking you from playing Minecraft. However, it is possible that your computer's firewall is blocking you (someone probably accidentally clicked
block when windows asked whether or not to block Minecraft from allowing other people on the network to connect). Here is how to unblock a port using Windows Firewall.