MULTIPLE SERVERS RUNNING ON A DIFFERENT USABLE IP, SAME MACHINE, SAME PORT

Discussion in 'Bukkit Help' started by Mastergalen, May 23, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Mastergalen

    Alright, so I am running 3 servers on the same machine and I have 5 usable IPs.

    I wish to have each server use a different IP so that you do not need to type in the port number at the end.

    In the server.properties setting I entered a different usable IP for each (server-ip=).

    All are set to the same port.

    However, when starting the server it says error binding to port.

    Thanks in advance :)
     
  2. Offline

    Paswaru

    Did you assign the IP addresses to the network interface?
     
  3. Offline

    Mastergalen

  4. Offline

    blazedd

    can you pastebin your config files?
     
  5. Offline

    Mastergalen

    Which config files do you mean exactly?
     
  6. Offline

    Nuinbot

    First, I am curious how you obtained 5 IP addresses. Please explain.

    One of my friends works a server in a similar fashion to yours, but he uses port numbers (25565~25568). I myself (and others if you Google search) have not had success in binding an IP address using server-ip=. Port numbers are a feasible workaround.

    Networking jargon alert:
    Most likely, you are not running a large mainframe and network backbone, so you most likely have not set up multiple VLANs on one NIC (network interface card). Therefore, it is extremely difficult if not impossible to give a single NIC more than one IP address. The use of port numbers is how you can connect to a single NIC for multiple processes, such as HTTP (port 80), FTP (21), Minecraft (25565 by default), etc. If you actually do have more than one IP address for multiple NICs, I would then suggest machine virtualization (VMware).

    In summary, you are best to use port numbers instead of IP addresses. If you want to simplify things for your users, purchase domain names for your IP address with port numbers. Ex:

    myminecraftserver.com -> 10.10.10.1:25565
    anothermcserver.com -> 10.10.10.1:25566

    Also, if these servers should be in any way connected to each other, you can serve them all on the same IP and port number via the Multiverse-Core plugin, which is what I do for my multiple-world server.
     
  7. Offline

    Mastergalen

    Would you not have to use anothermcserver.com:25566 to connect to a server on the 25566 port?

    The server is a dedicated server in some datacenter and they offer 5 usable IPs when you rent one of their servers.
     
  8. Offline

    Nuinbot

    I am sorry, you are correct. I should know better than to jump on the computer this early. I forgot that DNS only reroutes the IP address, not the port number.

    If the datacenter that offers you the 5 IP addresses is oriented to Minecraft specifically, then they should be able to help you out there. However, this is the first I have heard of it and I have never had success binding the IP address to my server specifically. Again, if you really wanted to do this, I am afraid that machine virtualization might be the only way.
     
  9. Offline

    Paswaru

    My testing server and production server both run on the same box within the same OS. I have two internal IPs assigned to the network interface on the box and bind each CraftBukkit to their respective IPs without any problems. Only difference in what Masterglen is trying to setup is he has 5 public IPs to play with.

    I don't know then. What I can do is post my ifcfg files and server.properties (once I get home) as an example of what they should look like, but it maybe just as easy to put in a ticket with your host.
     
  10. Offline

    Nathan C

    What OS are you using?

    Try pinging your extra 4 IP addresses and see if there is a response.

    Stop while you are ahead, you are making yourself look like a fool.

    You can bind as many IPs as you want to a single NIC.............
     
  11. Offline

    Paswaru

    I don't know how helpful this will be for you, but here are my network configs, assigning two different IPs to one network interface. This is from CentOS 6. Some Linux distro's setup their networks differently. From there my server.properties from each CraftBukkit server.

    You won't be able to copy and paste this, but maybe you will spot something different in your setup.

    /etc/sysconfig/network-scripts/ifcfg-eth0
    Code:
    DEVICE="eth0"
    BOOTPROTO=none
    BROADCAST="192.168.16.255"
    DNS1="8.8.8.8"
    GATEWAY="192.168.16.1"
    IPADDR="192.168.16.50"
    NETMASK="255.255.255.0"
    NM_CONTROLLED="yes"
    ONBOOT="yes"
    TYPE="Ethernet"
    HWADDR=00:1E:4F:F3:2B:FC
    PREFIX=24
    DNS2=8.8.4.4
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth0"
    UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
    
    /etc/sysconfig/network-scripts/ifcfg-eth0:0
    Code:
    DEVICE="eth0:0"
    BOOTPROTO=none
    BROADCAST="192.168.16.255"
    DNS1="8.8.8.8"
    GATEWAY="192.168.16.1"
    IPADDR="192.168.16.45"
    NETMASK="255.255.255.0"
    NM_CONTROLLED="yes"
    ONBOOT="yes"
    TYPE="Ethernet"
    HWADDR=00:1E:4F:F3:2B:FC
    PREFIX=24
    DNS2=8.8.4.4
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    NAME="System eth0:0"
    UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
    
    Testing Server's server.properties
    Code:
    #Minecraft server properties
    #Thu May 03 20:35:51 EDT 2012
    allow-nether=true
    level-name=OurCraftV5
    enable-query=false
    allow-flight=false
    server-port=25565
    level-type=DEFAULT
    enable-rcon=false
    level-seed=-8205291825226298542
    server-ip=192.168.16.45
    max-build-height=256
    spawn-npcs=true
    white-list=false
    spawn-animals=true
    online-mode=true
    pvp=false
    difficulty=1
    gamemode=0
    max-players=20
    spawn-monsters=true
    generate-structures=true
    view-distance=10
    motd=OurCraft Testing Server
    Production Server's server.properties
    Code:
    #Minecraft server properties
    #Sun Mar 04 10:44:37 EST 2012
    allow-nether=true
    level-name=OurCraftV5
    enable-query=false
    allow-flight=false
    server-port=25565
    level-type=DEFAULT
    enable-rcon=false
    level-seed=-8205291825226298542
    server-ip=192.168.16.50
    max-build-height=256
    spawn-npcs=true
    white-list=false
    spawn-animals=true
    online-mode=true
    pvp=false
    difficulty=1
    server-name=OurCraft
    gamemode=0
    max-players=20
    spawn-monsters=true
    view-distance=10
    generate-structures=true
    motd=Minecraft 1.2.5
     
  12. Offline

    Nuinbot

    ...but?

    You can NOT bind multiple IP addresses to one NIC unless you are running Linux. You would need NAT to achieve this type of setup on a Windows-based system. As the OP has not detailed their server setup except that it is remote hosting, I assumed the latter and gave an appropriate response.

    I am a student in networking and have already nailed down my CCNA and CCNP, so I like to think I am a little educated in this subject matter. If you still feel I am wrong, please feel free to PM me with related links as to the source of your information.
     
  13. Offline

    Paswaru

  14. Offline

    Wendo

    Ok, so there are a couple of ways to do this, as you can see under windows you can bind multiple IP's to a single NIC and under linux you can also create alias NIC's to add more than one IP.

    If you have a firewall in front of them though you don't need to bother with any of that, you can have the firewall forward connections to each IP onto your servers IP address and translate the port.

    Incoming connections on <ip1>:25565 can be forwarded to <server ip>:25565, connections on <ip2>:25565 can be forwarded to <server ip>:25566, connections on <ip3>:25565 can be forwarded to <server ip>:25567

    Any even half decent firewall will happily do this and it's much easier to setup that binding multiple IP's to a single NIC
     
  15. Offline

    Cicadia

    You can use a proxy type of server, listening on port 25565, to route all client packets through it to a server behind it at port 25566. That's the only thing I can think of.
     
  16. Offline

    FireBreath14


    try using freedns.afraid.org
     
  17. Offline

    Lolmewn

    Why not have one IP, and use BungeeCord? Much simpler imo.
     
  18. Offline

    Mastergalen

    This post has become obsolete since Minecraft 1.3, where SRV records could be used to assign a subdomain to a port number.
     
Thread Status:
Not open for further replies.

Share This Page