• 334 views, 1 today
  • 1
  • 0
Rogue's Avatar Rogue
Level 12 : Journeyman Crafter
19
There are multiple parts to adapting your network to be able to use minecraft. Typically, the two main things are your firewall and router.

For your router:
Easiest way to do this (port forwarding), hit the start menu, and search for "CMD" (terminal for linux, I'm assuming you know this. If you need a bit of help on this stage in linux, go to "Your IP, and which ones to use"). In that, you type "ipconfig", and find these two lines:

IPv4 Address: . . . . . . . . . 192.168.2.7
Default Gateway: . . . . . . . . 192.168.2.1

The numbers will be different, but keep track of them. You will access your router using the "default gateway" address in your browser, and try searching on the internet for your router model's default password (or, take a chance at one you normally use). From there, find something that has words along the lines "Port forwarding", and you fill in the feilds with the following information:

port 25565
port 25565
TCP/UDP
IPv4 address (192.168.2.7, in our example)

That would essentially be all you have to do to port forward. Keep in mind if your router also has a firewall, this also needs to allow through port 25565, or be disabled in general.




For a computer firewall:
- Not done yet-




Your IP, and which ones to use:
There are three different types. These are local, external, and loopback.

Loopback is like "127.0.0.1" or "localhost", which will connect to a server located directly on your computer. This is the same on all computers

Local (a.k.a. IPv4) is a server within your own household on a different computer, usually begins with either "192.168" or "10.0". This can be found in your terminal/command line usually using the "ipconfig" command (or "ifconfig" on a Linux OS).

External is anything outside of your home, and can be a large variety of IP addresses. If it is hosted within your household, many routers will have issue with you connecting to this. This can be found at whatsmyip.org

You will want to have other people use the external, while you will being using either your local or loopback




For failed to bind to port issue:
**** FAILED TO BIND TO PORT!
The exception was: java.net.BindException: Cannot assign requested address: JVM_Bind
Perhaps a server is already running on that port?


Chances are, if you are seeing this error, there are one of three things happening. First of all, if you are home-hosting, make absolutely sure that you have left this feild in the server.properties file blank:
server-ip=
If that does not already fix your problem, then either restart your computer (or, if you are able to, terminate all instances of "javaw.exe").

Usually, by this point, if you are unable to connect in that way, then something else is likely taking up the port. Try changing the port number in the file and seeing if any more errors ensue.




Is hosting a minecraft server safe?
Even assuming there are simple tools to just 'hack a server' and compromise everything on the server computer itself, the probability of being a target is so appallingly low. There are literally thousands of servers out there hosting Minecraft all of which have so much more appeal to be hacked (that is, servers that have information/data WORTH stealing). People would not, quite frankly, waste their time going after friends-only servers. To me, that is the single-most compelling argument that hosting from home is not dangerous.

- hexparrot

Another thing to note, using port forwarding to host your minecraft server is safe. Should you of been using hamachi in the past, then you have already taken much more of a risk then than you are now. Hamachi is the same as using a computer on the same wireless internet as someone. Browsing webpages is even more unsafe than hosting your own server, as you give out more information just by connecting to a webpage (like Operating System, IP address, browser type) than opening a single port on your firewall/router that will be taken up by a minecraft server. Lastly, by running the server and having everything directed correctly, any incoming traffic on your minecraft port will only be directed to the minecraft server. Should it be offline, the port is considered

In a very brief statement, you are more unsafe browsing random pages and google than you are hosting a minecraft server.

A bit more technical info on the firewall (it's good to read anyhow):
Technical Information

First off, without a firewall, you are JUST as vulnerable with or without forwarded ports. Getting around it without firewall protection is EXTREMELY easy. Therefore, NEVER shut off your firewall. Now then, if anyone reading this has run a portfowarded minecraft server (which, I'm most certainly assuming someone has), then they realize that you must also allow network traffic to pass through your firewall.
Now then, what most people don't realize is that while the packets are still allowed through, that does NOT mean that they are unmonitored. Allow me to explain how this works:

This is essentially the makeup of a network packet. They have a designation IP, which obviously is sent to you. Your forwarded port on your router then sends them to the machine hosting your server, and your firewall directs them to your server. The firewall looks at incoming packets, and if they are to be directed through the minecraft port (usually 25565), then they will be headed straight to the minecraft server that you are running. From that point, all info directed to xx.xxx.xx.x:25565 is processed through your server. If you run your server for most of the day, then you are more safe than leaving it offline. Also, if your server IP is not advertised, and only given out to friends, you are even MORE safe than posting it. And yet again, if you ever set up a packet sniffer (for that extra paranoid monitoring), you can even monitor the information sent to the minecraft server, as well as the messages makeup. Should you do this, keep in mind the amount of info a packet contains is fairly simple, such as a data value or a command.


Check if others can connect:
With your server running, go to canyouseeme.org and type in the port number you use for the server. Just for emphasis, you must make sure your server is running when you check with this. If it returns closed, then it is either an issue with your router or firewall, which you can look at the sections above for.




TroubleShooting:
During port-forwarding, you may find that after all that work, people still cannot reach your server. Now, before you start assuming that it is all right, and that it is not your fault, there is a list of things you can do to help fix it, and to help give us if you still cannot get it solved.

1) Determine which device on the network is causing the issue.

There is a simple test to do this. You can either use the computer hosting the server, or a second computer on the same network (aka connected to the same router). In Minecraft, use the server's internal IP, the one that you had used during port-forwarding. This test allows you to determine if the router or the computer hosting is at fault as when you use the local IP, the router's port forwarding is not used at all, so any issues with connections to the server means that the computer hosting has an issue.

- If the local IP does not work:
Check the computer's firewalls. If you have anti-virus software, make sure that the firewalls in it allow for the port 25565 (or whatever port you are using) to allow connections. If you have a Windows machine, make sure that Java is allowed and that port 25565 is allowed as well. If you really wanted to see if they were at fault, you can disable all your firewalls and test, and if that does allow it, then you just have to configure them to allow the server. I do not recommend leaving your firewalls off completely unless you are testing something as that is not a safe idea.

- If the local IP does work:
Check your router and see if it has any firewalls. Make sure they allow the port and also make sure your port-forwarding is correct.
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome