MrA2theZ

Q: Host 2 OS X Servers in a local network over the internet

Hi there! I don't usually resort to posting in discussion forums but I just couldn't find any answers specific to my situation and hope I can get some help on here from the expert users.

 

Here is what I have:
- Mac Mini running on OS X Lion Server

     Local IP: 1.2.3.46
- MBP runniing on OS X ML Server

     Local IP: 1.2.3.44

- TP Link router: Currently DMZ to 1.2.3.46

- a DynDNS hostname: "example.dns.com" which is linked to my home Public IP: 58.58.58.58

- A domain name "example.ws": CNAME created as per below

     server.example.ws -> example.dns.com

     server2.example.ws -> example.dns.com    

 

Here are the services that I would like to run:

- Mac Mini:  Web: server.example.ws

                    Mail

                    DNS

 

- MBP:         Web: server2.example.ws

 

So I have set the hostnames on OS X servers as below

Mac Mini: server.example.ws

MBP: server2.example.ws

 

 

I also added DNS zones as per below

Screen Shot 2013-10-21 at 10.57.28 pm.png

 

What I would like it to do

When a person visits server.example.ws, it will link to my public IP(58.58.58.58) which later get the info from my Mac Mini(1.2.3.46)

And vice versa

When a person visits server2.example.ws, it will link to my public IP(58.58.58.58) which later get the info from my MBP(1.2.3.44)

 

With the setup above, it seems to do it's job when I try to browse from any devices within the home network.

However, when I tried to browse from out of home network, both server.example.ws & server2.example.ws will show information of my Mac Mini(1.2.3.46)

 

Based on that, I'm seeking help here to find out how or what change should be done so that DNS is smart enough to get info from the correct machine?

 

Thank you in advance!

Mac mini (Mid 2007), OS X Server

Posted on Oct 21, 2013 8:19 AM

Close

Q: Host 2 OS X Servers in a local network over the internet

  • All replies
  • Helpful answers

  • by infinite vortex,

    infinite vortex infinite vortex Oct 21, 2013 9:38 AM in response to MrA2theZ
    Level 7 (21,405 points)
    Oct 21, 2013 9:38 AM in response to MrA2theZ

    Based on that, I'm seeking help here to find out how or what change should be done so that DNS is smart enough to get info from the correct machine?

     

    It's not a matter of DNS being smart enough but your router, and really your NAT device, being smart enough to route the incoming traffic to the right place. I typically recommend segreggation by service, and hence Port numbers, where doing this means you would need to choose which would be the web server for all web services. This is the simplest way to do it as most home routers aren't capable of doing what you want.

     

    Failing that you can also use alternate Ports for services on your MBP. For instance, your MBP responds to Port 8080 instead of Port 80 and you route that Port as required in your modem. Another option to do rewrites in Apache in your primary server to do alternate Port routing for you.