#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    1
    Rep Power
    0

    Dns Setup for server hive


    ok... this it either going to sound silly or i am doing something completely wrong.... i have 6 servers that i am setting up to host minecraft servers. all the systems are in place and the servers are working perfectly locally. using there respective domain names which have been setup using an internal dns.

    all the ports for the servers have been forwarded and are all using the same ports, the ports that the servers are using are:

    80
    443
    12321
    12320
    25565

    each server has its own sub domain and is communicating correctly.

    this is my setup

    ISP/Router -- Switch -- internal business
    -
    Router 2
    -
    Switch - Servers 1 - 6

    the 2nd router is a custom linux box to handle dhcp, port forwarding and dns.

    i have pointed all the sub-domains for the servers from my external web hosting business to my Static External ip.
    then told my dns server to send each sub domain to a particular server in the network. however they all seem to ignore that and go straight to the first server. im not sure what i have done wrong and i have been trying for 2 solid weeks to fix.

    if anyone has any suggestions i would be very great full


    -Edit-
    To put it more simply i guess - have 6 subdomains that all point to 1 ip. then i need to then send to 6 diff servers as they all use the same ports. im starting to get the feeling this may not be possible
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    That's not possible. The purpose of DNS is only to map a name to an IP, once that mapping is complete the actual communication happens using the IP. Unless the communication protocol involves sending the original name as part of the message, there is no way for the server to know what name was used in the original mapping.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    surfing the interwebz
    Posts
    2,410
    Rep Power
    2005
    It sounds like you need to setup a static nat mapping from your public IP to each server based on port IDs. For instance, if your public IP is 1.1.1.1, you would forward the necessary traffic for the server that uses port 443 via your ISP router. You would then forward that traffic to "router 2". You'd then have to create a nat rule on router 2 to forward that traffic to the actual server.

    Basically:

    |ISP/Router
    |
    ||Nat Rule forwarding traffic on all 5 (assuming you left one out since you said there are 6 servers) ports to router 2's "outside interface"; the interface that joins your server network to the rest of your network....or however you have it setup.
    |
    |||Nat rule on router 2 forwarding traffic on each specific port to the necessary server.
    |
    ||||Firewall rules allowing all those ports on BOTH routers.

    This would be known as a double NAT scenario and can have some issues; however I do it all the time and more often than not it works ok.
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    I was assuming the servers were all running the same set of ports, but if each server uses a different port then you can configure the routers to do port forwarding.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo