Easier Server Creating and Portforwarding?


#43

People running data centers would not care about what you did for forwarding, as you could not affect he machines around you without specification to the data center. Every server is either outside there network (on the web) or is on a VLAN with your other servers (for bungee use on multiple machines). Therefor this wouldn’t be a problem. If the company decided that they would want to limit that, than its a simple Boolean in the (perhaps) networking config, which provides the ports to forward, to auto forward, netty threads to use, bandwidth limits, etc.

Also for a VPS sponge server (theoretical), they would have trunk lines to prevent security breaches as well as ACL’s to prevent the devices from talking to things they shouldn’t be talking to.


#44

First I am not ten, and second I am not useless. I may not be very good with coding but I have been playing minecraft for many years now and have always wanted a private server for just me and my friends. I do use Gratis Server but that is so limited, I have to reopen the server every two hours and I get a new IP when I have to reopen it.


#46

I know that this thread is 5 years old.

The statement that port-forwarding is hardware specific is plain wrong.

There are a number of ways to achieve this within most Unix like systems (Linux, etc…)

  • Use iptables
  • Use DNS

I prefer the DNS solution. It’s easier to setup.

First some assumptions.

You can edit your zone file.
You have a domain name.
You have an IP address associated with your domain that is static.
Your system is running bind9

Let your domain name be foobar.com for sake of argument in this example.
Let your IP address be ADDRESS in this example for sake of argument.

To get your real IP address just run ifconfig and look for the interface that is connected to your gateway. It needs to be a routable address so addresses on networks like 10.0.0.0, 172.16.0.0, 192.168.0.0 are not routable. They are also called private networks, sometimes.

Ensure you have routable IP address. Let us call it ADDRESS for sake of argument.

Let PORT be equal to the actual non-default port that a Minecraft server is running. If you have several servers on different ports on the same machine, that’s OK. We can discuss how to map them individually.

  1. In your zone file, increment the serial number of the records:
    The preamble of your zone file may look very similiar to this:
foobar.com.    IN      SOA     ns1.foobar.com. root.foobar.com. (
                     201902101; Serial
                          3h            ; Refresh
                          1h            ; Retry
                          1w            ; Expire
                          1h    )       ; Negative Cache TTL

The number 201902101 is the serial number. Many choose to use the YYYYMMDDN as a pattern. You can start with 1, or whatever number you want as long as each time you update the zone file, you increment the number.

In your zone file, add 1 to the number.

  1. In your zone file add this:
_minecraft._tcp.foobar.com. 86400 IN SRV 0 5 PORT ADDRESS
  1. Restart bind
    systemctl restart bind9

It might take a few hours for the information in your zone file to propagate.

That’s it.

Once this is done, when people try to connect to foobar.com expecting a Minecraft server, they will get connected to foobar.com:PORT instead. They won’t know the difference.

If you have multiple hosts to map, just add more records with unique PORT numbers. Remember each time you change the zone file to increment the serial number

You might have thought that the in-application handling of this would be doable with Minecraft. It is, for it’s not uncommon to see applications use the strategy to map multiple domains to one IP address, even on the same port number. Look at how Apache works for instance.

But for Minecraft, the simple solution is just SRV records.

Good luck.


#47

If you have a firewall on your router or on your ISP you cannot just do that… This question is more aimed at home users.

If your hosting in a data center or using a host, it’s a totally different story, and frankly, if you are doing using a datacenter, you should already know how to do this.